
1 minute read
List features and components for installed MSIs
This is not actually a tool, but rather a script that helps you compare if you performed the right changes to an MSI with a MST. Let’s say that you have a big vendor MSI with lots of features and components and you apply a transform to it (according to the specifications) that alters features and components (e.g. you remove certain features). It shouldn’t be an issue. But, how do you test if everything is installed successfully? How do you know if you selected the right features and components that need to be installed? There are cases where a setup.exe that contains a hidden MSI installs that MSI with a certain INSTALLLEVEL that could remove certain features.
Microsoft offers a VBScript called WiLstPrd.vbs which is present in Windows SDK Components for Windows Installer Developers. With it, you can list products, properties, features, components and much more. How can you use it to compare your original MSI with the one that has the changes you added? It’s easy. First, install the original MSI on a clean machine with the wanted changes.Copy the WiLstPrd. vbs to a specific location, for example C:\WiLstPrd.vbs.In the same directory, create the following batch file listfeatandcomp.cmd (C:\listfeatandcomp.cmd):
Advertisement
cscript “C:\WiLstPrd.vbs” {11111111-2222-3333-4444-555555555555} f > “C:\ features.txt”
cscript “C:\WiLstPrd.vbs” {11111111-2222-3333-4444-555555555555} c > “C:\ components.txt”
Replace {11111111-2222-3333-4444-555555555555} with your MSI product code before executing the batch file. The “f” parameter outputs the features and the “c” parameter outputs the components. For more details, check out the official documentation here.
After you double click the listfeatandcomp.cmd, two txt files will be created in C:\, features. txt and components.txt, each containing the installed and uninstalled features.Now, on a clean machine, install your MSI with self-designed MST and repeat the steps.