简体   繁体   中英

How to build MSI package on a linux server?

I have a windows desktop application which is currently available on a Linux<\/strong> server for download on user's machine. I want to automate the process of MSI<\/strong> packaging on the same Linux<\/strong> server using any EXE\/DLL<\/strong> .

Some information should be read from text file and injected into exe before creating an MSI<\/strong> package. This entire process has to happen dynamically in the Linux server only after the user clicks on download.

I want to achieve the same by having minimum dependencies on any additional\/3rd party tool.<\/strong> TIA for any time and effort.<\/strong>

False Positive Risk : Creating a new binary for every user would seem to be very unwise because of malware scanners and their ability to recognize "known" versions of binaries (by hash).

If you create a new binary for each user, the malware suite might suddenly start to quarantine your setup without any warning or sense. This problem is not trivial anymore as malware control is hardened everywhere and setups that run with elevated rights are "prime suspects for risk management".

Digital signatures can help, but they are merely a guarantee that you made the setup, and not a guarantee that the setup doesn't contain anything harmful. Nothing worse than signed malware vectors. In fact it is proof positive that the malware came from you :-). Note: some people even manage to tamper with signed executables . The combination of the latter two fact is very troubling.


Application Setup : I like to eliminate such features and details from the setup and make the application itself responsible for it own configuration on first launch after installation. I find this more reliable and easier to debug.


Custom Configuration : You can apply custom configuration information at runtime via various mechanisms. You should add in a transform , or you can create a batch file next to the setup with this information embedded and pass to the MSI or the setup.exe .

Batch File? : The msiexec.exe command line supports passing parameters to the MSI. You can generate a batch file that will run the setup with such parameters if you design your setup to support these "incoming" parameters.

msiexec.exe /i myinstaller.msi ADDLOCAL="Program,Dictionaries" SERIALKEY="1234-1234" /qn

Transform : You can also create a transform to contain the parameters (a transform is a tiny MSI fragment with settings and changes to the original MSI):

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

A transform would be difficult to create on a Linux box, seeing as they are COM-structured storage files native to Windows only. I am not sure if it is even possible, but maybe.


Some Links :

We have had some success with wixl<\/code> from msitools<\/a> .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM