PDA

View Full Version : Extract from msi installer output without executing it



davebrue
11-04-2014, 11:30 AM
I would like to extract the msi from an install shield exe (built as an MSI project) from code without executing the installer. My goal is to get information from the msi such as the upgrade code but possibly other information in the future (I am using the WiX DTF SDK to do this). At present I am using the following cmd line switches


<installer file>.exe /s /x /b"<output dir>" /v"/qn"

As I understand, this will still run the installer which seems like a pretty heavy handed way to do this and has potential security risks in my software. I'm open to any other ways that I can get this information that don't require me to extract the MSI as well... I'll need to redistribute anything I'd use for this. Thanks.

MichaelU
11-05-2014, 09:23 AM
Since you must invoke the code in setup.exe to do this, you are always potentially susceptible to malicious code (if you can't trust the source of the setup.exe). If you can minimize or otherwise accept this risk, you can avoid running the .msi itself by using the /a parameter as documented in Setup.exe and Update.exe Command-Line Parameters (http://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/IHelpSetup_EXECmdLine.htm) to perform an administrative installation.