Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why the shortcut created by my MSI install start the setup process again each time?

I created my MSI installer for our C# application via VS 2008. I installed it. It created a shortcut for me on the desktop. I clicked that shortcut, the setup process running again and at the end our application was launched. It was not like this yesterday before I added some custom action to create database. I didn't recreate the shortcut in the installer. why it is like this?

like image 905
5YrsLaterDBA Avatar asked Sep 29 '10 19:09

5YrsLaterDBA


People also ask

What does MSI installer do?

An Installer is a person who connects, installs and commissions items and products. Installers may work within various industries, installing computer systems, air conditioning and refrigeration, carpentry and cabinets or security systems.

What can MSI or setup install?

The MSI file extension is used to install software on Windows operating systems. It can be used to install, uninstall, configure, and update programs on the computer.


2 Answers

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)
  • 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
like image 160
Dirk Vollmar Avatar answered Oct 06 '22 09:10

Dirk Vollmar


Open the MSI manually using Orca. Add the following record to the Property table (Property, Value) without the quotes:

Property = 'DISABLEADVTSHORTCUTS' Value = '1'

This can also be scripted and run as part of a post build event.

like image 44
rhinofrim Avatar answered Oct 06 '22 10:10

rhinofrim