I created an MSI setup via Visual Studio 2008 for my application, and added a registry key to windows\run for automatic startup, but also implemented a function in my application to disable automatic startup. However, when the applicati开发者_如何学Goon is restarted, the key is automatically repaired.
How to prevent MSI from repairing the key??
Thank you!
The registry key is repaired because it was installed by your package and Windows Installer knows that it should be present. Some possible solutions are:
- Move the entry in a separate component which doesn't have a Component ID. This way the component is not registered with Windows Installer.
- Use a custom action to create the registry entry during install.
精彩评论