Why the shortcut created by my MSI install start the setup process again each time?
2011-11-08 10:59
459 查看
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.
一个好的解决方法是,在Visual Studio中在一个Custom UI dialog中override "DISABALEADVTSHORTCUTS"的值。
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.
MSI默认提供的是Advanced Short-cuts.
One advantage of advertised shortcuts is you can have certain features be installed on demand, and I think missing files
can also be repaired if I'm not mistaken. The downside as a user that I hate is I sometimes want to find out where the executable is and which executable is run and it's harder to find that out.
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.
一个好的解决方法是,在Visual Studio中在一个Custom UI dialog中override "DISABALEADVTSHORTCUTS"的值。
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.
MSI默认提供的是Advanced Short-cuts.
One advantage of advertised shortcuts is you can have certain features be installed on demand, and I think missing files
can also be repaired if I'm not mistaken. The downside as a user that I hate is I sometimes want to find out where the executable is and which executable is run and it's harder to find that out.
相关文章推荐
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- Why do my text files suddenly have an additional at the end of each line?
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- [Chapter 3 Process]Practice 3.12 Including the initial parent process, how many processes are created by the program shown in Figure 3.32?
- "Setup has detected a pending system reboot from a previous install, Setup Cannot continue until the machine is rebooted. Please reboot the machine and run the installation again."问题的解决。
- Error while trying to run project:unable to start debugging.the debugger is not properly installed. run setup to install or repa
- Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of
- How to Set Directory Permissions at Install Time using an MSI Created Using Windows Installer XML (WIX)
- CreateProcess by modify the struct STARTUPINFO, sth you must be careful!!
- [Chapter 3 Process]Practice 3.2 Including the initial parent process, how many processes are created by the program shown in Figure?
- Unable to start debugging on the web server. The IIS worker process for the launched URL is not currently running
- Why does my Cyclone III FPGA fail to access the EPCS device using the EPCS Controller module?
- The Best Time of My Life
- Unable to start the daemon process
- on Ubuntu 12.04 to install and setup the tomcat 7
- Android Studio Gradle project sync failed,Gradle sync failed: Unable to start the daemon process.
- How to view the W3WP process by c#?
- Ubuntu 12.04 X64,The AVD cannot start up by eclipse
- Why The Hell Would I Use Node.js? A Case-by-Case Tutorial