Question

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 application is restarted, the key is automatically repaired.

How to prevent MSI from repairing the key??

Thank you!

Was it helpful?

Solution

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:

  1. Move the entry in a separate component which doesn't have a Component ID. This way the component is not registered with Windows Installer.
  2. Use a custom action to create the registry entry during install.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top