Windows Installer Query Tool - General Information

About

You can start to collect you own MSI database queries, test and improve them. Keep in mind that they also could be accessed in Windows PowerShell, VBScript, .NET code or even from MSI via WIX DTF custom actions.

However, syntax sometimes quite tricky... MSDN information about supported statements:
http://msdn.microsoft.com/en-us/library/aa372021(v=vs.85).aspx

How to start

Start by launching tool's MS Excel sheet from the "Windows Installer Query Tool" shortcut on the desktop or in the Start menu. It links to Excel sheet with the same name.
Of course, you can have multiple and your own custom sheets side-by-side in the Windows Installer Query Tool folder. Just use default one as a template.

Select and open your favorite Windows Installer package or binary InstallShield project file. Note, that XML InstallShield project will give an error! Convert it by using "InstallShield Installation Information" -> "General Information" -> "Project File Format" option. As below...

Let's assume that you succeeded and successfully opened an MSI database.

Now you can first look and change some general information which couldn't be accessed by the queries...

Press "Apply" when done. Then save a package.

Then just modify some pre-defined queries (new versions of the tool will include more - please send them to me)...

Combo-box list being collected from the sheet also! So - it is simple to manage it. Import from it automatically made during startup or manually.

Windows Installer Query Tool Query ListAlso, you can get entire tables completely... You always able to copy and store the tab with the results.

Get Table Completely

All executed queries logged in the "Query History" tab (until you clean up them of course).

When you completed your SELECT query it is also possible to apply some filters to its results. And even based on regular expressions ("Pattern" and "Replace" input fields), which also could be collected in the separated column for the future reference.

Open MSI without Read Only (check box on the "Open MSI" dialog box) - and you will be able to write INSERT and UPDATE statements for your packages.  For Package Code update <NewPackageCode> statement could be used. You can automatically generate new GUIDs by using <NewGUID> or <NewGUIDcoded> aliases, for ProductCode or component code updates (see example queries available). Also GUI available in MSI toolbox for that purpose...

If you need to execute sequence of different queries - use "Query Batch" tab and list them there. "END" indicates end of the batch sequence.

Execute by pressing "Execute Cell" -> "Execute Query Batch" or "Execute Batch" button in the sheet itself. It is only enabled one in case if no package is open!

Known limitations

  1. In Office 2007 some icons might be missing - in the future versions this will be corrected
  2. Additional MSI tabs are only available in MS Excel if "Windows Installer Query Tool" sheet being opened

Wish you successful use of this tool and please share your experience!

Pavel.

img src=

img src=

powered by Icomments'