1

I would like to encapsulate a .msi into an .exe in order to add:

  1. Hardcode folder location, example C:\Program Files (x86)\TEST\
  2. Add installation version file
  3. Use silent installation
  4. Use of command line switches (install/uninstall)
  5. Log generation
  6. Add Windows Registry foot prints
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Tana
  • 297
  • 3
  • 13
  • 1
    You don't need to go near an executable in that case. All the logic you require can be encapsulated inside your MSI file. Grab yourself a free copy of Orca, open your MSI and look in the Directory table (for point 1), the File table (for point 2), the Registry table (for point 6) and Google 'MSIEXEC Command Line' for points 3,4 and 5. – Captain_Planet Oct 04 '19 at 07:16
  • Really? ok I'll download Orca right now :) – Tana Oct 04 '19 at 07:37
  • Are you in a big company? They tend to have whole departments to package software. A quick check with your manager could solve your whole problem - if you give it a few days of turnaround time? – Stein Åsmul Oct 04 '19 at 08:46
  • Please don't do that. I absolutely abhor this practice. .EXE files for most people unwilling to put in the time and effort required -- meaning most users most of the time, developers like myself included (who know what PE format is) -- are black boxes, especially compared to MSI files. I don't want to ever deal with software distribution purposefully made into a black box. I want to be able to inspect the often undocumented package for public properties that let me control what to install, where and how. Please don't do people a disservice. None of the things you mention warrant an .EXE file. – Armen Michaeli Mar 29 '20 at 12:49
  • It was requested by the company, actually it was requested by team in charge to distribute those packages in the common repository...so.. I did not have more options :( – Tana Apr 09 '20 at 01:41

1 Answers1

1

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:

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


Links:

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

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks Stein! This is exactly what I was looking for! – Tana Oct 07 '19 at 16:33
  • Great, hope it solves the issue. Do try to find out if there is a packaging team in your company though. Can solve the whole issue easily. You can tick the check box tag (marking it green) to set the answer accepted if it worked for you. – Stein Åsmul Oct 08 '19 at 01:55