How to Build Msi Package on a Linux Server

How to create precofigured installer (MSI or EXE) with valid signature?

Meanwhile I found a way to add data to a signed EXE without invalidating signature. Yes, I also thought it is impossible. It is terrible hack, which works by modifying certificate section, which is not part of signature and it is at the end of file. So you can append to the end of EXE and just do some fixing of section size. I checked it works, signatures are valid, program runs, AntiVirus doesn't complain as well.

Description of the approach:

  • http://blog.barthe.ph/2009/02/22/change-signed-executable/
  • http://reboot.pro/topic/15889-modify-a-signed-executable-without-invalidating-its-digital-signature/

Working program to add payload:

  • http://reboot.pro/files/file/85-digitalsignaturetweaker/

Obviously, as being hack it may stop working any time.

Building an MSI package from Powershell

Windows Installer XML (WiX Toolset) is a language / compiler that builds MSIs. It has MSBuild / Visual Studio integration support. It can easily be built in an Azure DevOps pipeline and doesn't require Cake or Powershell to do do.

I have an open source project called Industrial Strength Windows Installer XML (IsWiX) which builds on top of WiX and provides project templates and graphical designers to assist with most of the WiX development. When you go past what IsWiX provides you can still author the WiX directly to meet your needs. I have some tutorials at:

https://github.com/iswix-llc/iswix-tutorials

The IsWiX project templates have built in versioning and major upgrade patterns that automatically integrate with Azure DevOps. It's all explained in the tutorial.

Your taking on a pretty big task. Consulting services are available for those interested.

Jenkins Packaging a exe and dll's to msi

Repackaging implies you have a third party installer that you want to reverse engineer into a new/better MSI. You are just packaging not repackaging.

This is a two part question:

  1. Author an MSI. I recommend using WiX and IsWiX starting with this tutorial.

  2. Build it using Jenkins. WiX supports MSBuild and Jenkins has a MSBuild PlugIn. Standard stuff except not that the .WIXPROJ created by IsWiX templates expects you to pass the MSBuild Property MSIProductVersion. The correct format for this property is 0-255.0-255.0-65535. You can tack on a fourth field if you would like but it will be ignored. The IsWiX project templates are set up for Major Upgrades by default so make sure one of these 3 fields is incremeented with each release. ( 1.0.0, 1.0.1, 1.1.0, 1.1.1, 2.0.0 )

Why can I manually build a Python MSI installer, but my Bamboo remote agent service fails to?

If the Bamboo agent is a Windows service, you might need to run it with elevated privileges. There are weird rules about how service accounts can access the MSI service. (I never narrowed down the exact permissions that are required.)

What is the best tool kit to transform .msi into .exe?

MSI Customization: Customization of MSI files for installation is a built-in feature of the technology. there are two primary ways to customize the installation:

  1. Light Weight: You can set PUBLIC properties on the command line as a light weight form of customization, sample here and here, or...

    msiexec.exe /i setup.msi ADDLOCAL="Core,Spell" SERIALKEY="1234-1234" /qn
  2. Heavy Weight: Use transforms (database fragments of changes) to make large changes to the whole installer - you can change almost anything in the whole package.

    msiexec.exe /i setup.msi TRANSFORMS="mytransform.mst" /qn

Tools: Major MSI tools - the major tools available to make and customize MSI files. And some (primarily) free MSI tools. Orca can be used to make transforms - customization fragments for MSI files. See that last link for how to get it downloaded / installed.


msiexec.exe Command Line: The msiexec.exe command line is complex and somewhat unusual:

  • msiexec.exe Command-Line Options
  • Msiexec.exe Command Line (Advanced Installer)

There is this ancient tool that can help to build command lines. No longer officially available, but it might be gotten from archives.


Links:

  • How to make better use of MSI files (actual explanation of MSI customization via transforms)
  • How to run an installation in /silent mode with adjusted settings
  • MSI Repackaging - free tool

Further: Further links - just for reference, the above should suffice.

  • Can the resulting command line be determined after running an .msi installer?
  • How to build MSI package on a linux server?
  • How to convert an MSM file into an MSI file on the command line? Doing this with the Windows Installer SDK, or COM
  • How to push MSI with parameter using SCCM server
  • How to uninstall dangerous MSI package
  • How to tag or customize the a binary (for example of an installer)
  • Microsoft Installer command line string parameter not working?


Related Topics



Leave a reply



Submit