Written by D. G. Schneider ContactEZ.net


MSI Installer Automation Command Line SDK MSIDB.exe and MSIZap.exe

Here are some of the MSI, MSM, MSP command lines used with MSIDB.exe and MSIZap.exe

Related topics: msiinfo.exe, MSI Automation, MSI Tables Overview, Create MSI Tables, MSI UAC VISTA, MSI Error Table, BootStrapper VISTA, MSP VISTA, Install MSI SDK Tools V3.1.4, Create CAB File, Build MSPs

The command line to merge a MSM into a MSI is:

"C:\Program Files\Orca\orca.exe" -q -m "C:\Program Files\Common Files\Merge Modules\Microsoft_VC80_ATL_x86.msm" -f Programfiles -r TARGETDIR -l Merge.log -! "C:\DGSMSI\Validation\DGS Professional.MSI"

You can get the path to the orca.exe by grabbing the registry key HKEY_CLASSES_ROOT\Applications\Orca.exe\shell\edit\command using RegOpenKeyEx (Declare Function RegOpenKeyEx) and RegQueryValueEx (Declare Function RegQueryValueEx)

To export the delivered files of a MSM into a CAB file the command line is:

msidb.exe -d C:\MYProd\MSM\CSS\Disk1\XYZ.MSM -x MergeModule.CABinet

To kill the merge module CAB file the command line is:

MSIdb.exe -d MYMSM -k MergeModule.CABinet

To include the MergeModule.CABinet into a MSM the command line is:

MSIdb.exe -d MYMSM -a MergeModule.CABinet

To export the Media Table from a MSI the command line is:

MsiDb.exe -e media -f "C:\My Tools\My Prod\English\NewIDTs\" -d My Prod.MSI

Once you created all the IDTs you can import them using in the MSI the command line:

MsiDb.exe -i *.idt -f MyIDTFolder -d TheMSIName

To validate a MSI or a MSM on the fly use the command:

msival2.exe MSMSI Darice.cub -f -L Packaging.log

msival2.exe MYMSM mergemod.cub -f -L MSMPackaging.log

To export all the files included in a MSI packaged product into a folder of your choice without installing the product (administrative installation):

msiexec /a MYMSI TARGETDIR="C:\MSP\MSIOUT\out" /qn

To export in a folder all the files included in a MSP without installing the base product and the MSP:

msiexec /P MYMSP /a MYMSI /qn

The MsiZap utility is intended for removal of products installed with MSI that, for some reason, cannot be uninstalled.
You can log an uninstall with: msiexec /x {your product code guid} /l*v mylogfile.log

The other utilities you get with the SDK are: Expand.EXE, GuidGen.exe, MakeCab.exe, msicuu.exe, MsiDb.exe, MsiZap.exe, MsiZapA.exe, regwiz.exe, msival2.exe, orca.exe and WiLogUtl.exe

A partial or complete application reinstallation might be required if any files or registry entries associated with any feature have become corrupted or are missing. See more MSI dialogs...

Task Manager

The Microsoft Windows Installer offers the easiest way to install a product on a PC. Mostly driven by tables. These tables can be exported into text files, or imported from Tab delimited text files. Thus the setup process of your products is greatly facilitated.

You can create MSI tables on the fly and automatically import them in the MSI, then create the DDF files that will in their turn create the CAB files. Some custom tools can for example import REG files into the Registry Table.
To create the CAB files use Microsoft MakeCab.exe and on the fly a batch process
This means you can automate the packaging of your products by creating on the fly the tables that will change for each product packaging.
To import the table use MsiDb.exe (provided with the Windows installer SDK).
To validate the packages use Orca or Msival2.exe (both are provided with the Windows installer SDK).
The .cub file darice.cub is also provided with the SDK.
This file contains the ICE (Internal Consistency Evaluators) custom actions needed by Msival2.exe to perform validation.

MSIEXEC's Normal behavior is to launch multiple instances of itself; during a normal install you can expect to see 6-7 different instances of it; usually no more than 3 or 4 concurrently.

For more information:
Importing VBS JPG - Unable to place file in stream, Replacing Non-versioned Files - User Data, ProgID table produces error during run time - Validation, Remove registry info entries for all users in system or just owner?, MSM Validation - ATL.MSM, and more... see my posts with ContactEZ.net on group:microsoft.public.platformsdk.msi

See more discussions and posts about MSI:
Replacing Non-versioned Files User Data with companion files
New tools to Import VBS JPG - Unable to place file in stream - MSIDB
MSM Validation - ATL.MSM - Documentation
Remove registry info entries for all users in system or just current owner
ARPPRODUCTICON OK for XP not for W2K Add/Remove Programs
Msidb Command Line Folder Path MSI name limitations
Do NOT Associate Extension set flag file types as No Open in Verb Table
Property for All Users Shared Documents or CA?
File Hidden Attribute after installation - Source in CAB files
260 characters limit in shortcut's targets Windows not MSI/Setup Limitation

Return Home - Index