MSI comes with an auto-repair feature that checks whether all components installed by MSI are still present when you launch your application using the shortcut.
In your case, probably one (or more) components have been removed so the installer is launched again to repair your installation.
To prevent auto-repair from running either
- Make sure no file, registry setting or other installed component is removed
or
- Don't set the key path for those components. That will prevent MSI from checking those specific components
From your other questions it seems that your MSI has been created by a Visual Studio Setup and Deployment Project. Unfortunately, there is no option to modify the key path from within Visual Studio. You have the following options:
- Modify the MSI manually using Orca (This is not a good option because it is a manual step) (Property = 'DISABLEADVTSHORTCUTS' Value = '1')
- Write a script e.g. using VBScript to patch the MSI file
- Move to a more advanced install system which gives you more control such as WiX or NSIS
- msiexec /i <msi file> DISABLEADVTSHORTCUTS=1.
Here is how I did it:
-
Open the User Interface for your Deployment project (with the deployment project active choose View>Editors>User Interface).
-
Select the "Start" section of the User Interface and then from the action menu choose "Add Dialog" and add a "Textboxes" dialog.
-
In the properties pain for the Textboxes dialog set the BannerBitmap, BannerText, and BodyText properties to something informative to the user running the install (the user will never know that this dialog is doing something behind the scenes).
-
Set the following properties for the Textboxes dialog:
-
Edit1Property: DISABLEADVTSHORTCUTS
-
Edit1Value: 1
-
Edit1Visible: false
-
Edit2Visible: false
-
Edit3Visible: false
-
Edit4Visible: false
-
That’s it. When windows installer gets to that dialog and the user clicks "Next" it will insert the property DISABLEADVTSHORTCUTS = 1 into the property table and so when the actual install occurs standard windows shortcuts will be used instead of advertised shortcuts.
Note: Due to the advantages of advertised shortcuts I recommend using the default setting if it will work in your situation. Only use this work-around if you have some reason to need standard shortcuts.