MSI SQL Tool

The MSI SQL tool is a command line program that will help you manipulate existing MSI databases. This tool was introduced to help modify minor things after processing in the MSI Wrapper.

Usage

MSI SQL Tool 7.0.8.0 (experimental version)
Copyright (c) 2015 - EXEMSI.COM
License key: XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-F53CD6

DESCRIPTION:

This program runs queries against the MSI database.

USAGE:

  MsiSql.exe [PARAMETERS]

Parameter         Description
----------------- -------------------------------------------------------------
msi               File name of the MSI to modify.
query             SQL query to run.


EXAMPLE:

MsiSql.exe msi="test.msi" query="INSERT INTO `Property` (`Property`, `Value`) VALUES ('TESTPROP', 'TESTVALUE')"


EXIT CODES:

0 = Success
1 = Error

Example

The following command lines were used to enable downgrading of a program wrapped by MSI Wrapper.

MsiSql.exe msi="Inno Dummy\Output\setup.msi" 
query="DELETE FROM LaunchCondition"
MsiSql.exe msi="Inno Dummy\Output\setup.msi"
query="DELETE FROM Upgrade WHERE ActionProperty='WIX_DOWNGRADE_DETECTED'"
MsiSql.exe msi="Inno Dummy\Output\setup.msi"
query="INSERT INTO Upgrade (UpgradeCode,VersionMin,Attributes,ActionProperty) VALUES ('{213D4F40-D9B0-42F9-96ED-E725768E7CB6}','2.0.0.0',4,'WIX_DOWNGRADE_DETECTED')"
MsiSql.exe msi="Inno Dummy\Output\setup.msi"
query="UPDATE Property SET Value=' ' WHERE Property='BZ.FIXED_INSTALL_ARGUMENTS'"