I have a simple C# application that allows users to specify that it should be (or should not be) started with Windows; it does so by setting (or deleting) a registry key (namely, ...\Software\Microsoft\CurrentVersion\Run\MyApplicationHere).
I am using a VS setup project to create the installer for this program. I don't want the installer to create this key; it should only be created when the user selects the option from within the program.
Here is the issue: I would like the uninstaller to delete this key if it exists, preferably without resorting to any sort of hackery; if there is a simple "built-in" solution I would love to hear it. Thanks!
just right Click on Setup then Select View -> Registry, you can add a registry key to the list. The key has properties (right click -> Properties) AlwaysCreate,DeleteAtUninstall and Transitive keep AlwaysCreate to false, and DeleteAtUninstall to true and Transitive to true as well adn its Done..
The Registry table is designed for this:
http://msdn.microsoft.com/en-us/library/aa371168(VS.85).aspx
See especially under the description of "Name":
If the Value column is Null, then the strings shown in the following table in the Name column have special significance.
- The key is to be deleted, if present, with all of its values and subkeys, when the component is uninstalled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With