Archive for the 'MSI TIPS' Category

ResolveSource Action , can cause for an uninstal fail.


 Some of the vendor MSI’s which is badly designed will look for the source MSI during uninstall instead of using the cahed MSI.

Most of the cases will be due to the presence of ResolveSource action in the installation sequence.

Unless the MSI itself is badly designed,The original MSI is not needed for uninstall. All MSI files are cached in %WINDIR%\Installer*.* using a random name. This contains the installer structure only, and no files.This MSI file is used for any maintenance and uninstall operations – and it is sufficient for uninstall in the vast majority of cases. The original source is only needed if files need to be copied to disk (for a maintenance install), or the MSI does an explicit request to resolve the original source via the standard action ResolveSource or via a custom action (which shouldn’t be done in a properly authored package).


The ResolveSource action determines the location of the source and sets the SourceDir property if the source has not been resolved yet.

The ResolveSource action must be called before using the SourceDir property in any expression. It must also be called before attempting to retrieve the value of the SourceDir property using MsiGetProperty. The ResolveSource action should not be executed when the source is unavailable, as it may be when uninstalling the application.

Note: The issue you can replicate by creating an MSI with this ResolveSource action and install with an Admin account from a mapped network drive, and try to uninstall with a SYSTEM account.The source path will be set to the mapped drive during install and as the SYSTEM account may not have the visibility to the mapped drive, the uninstall will fail stating the MSI can not be found. 



What is the importance of ‘v’ in REINTALLMODE?

msiexec /i test.msi REINSTALLMODE=vomus REINSTALL=ALL

The important part is the "v" in the reinstall mode settings. It forces the use of the new msi
file instead of the cached copy.

If you are upgrading a package with same product code and different package code(ofcurse) use ‘v’ inorder to recache the new msi.

How to make an application available in Open With ‘Desktop Menu’


By using the registry HKLM\SOFTWARE\Classes\Application we can make an application available in Open with Menu.

This Registry determines the list of applications shown in the "Open With" list.


Registry Key:   HKLM\SOFTWARE\Classes\Applications\<EXE NAME>.exe\shell\open\command
Value: <Default>   = "<FULL PATH OF THE EXE WITH EXE NAME.EXE>" "%1"