Reputation: 1915
I am working on a project, where I need to give a repair/remove option to my installer [which will be shown at installation time] if the program previously installed. And I need to do it with VS 2008. Please help me on that.
EDIT: Actually for some security reason I removing registry entry for previous installation. So that I can uninstall it from my application only, which is password protected. So thats why I need to customize that repair/remove option. So that it will appear by seeing some specific registry value. How can I do that ?
Thanks.
Upvotes: 0
Views: 1078
Reputation: 1647
I believe WIX is more suitable for your requirements where you have more control over your installer.
If you only want your application to be uninstalled only from your application, you can probably add a custom action (or Condition) in your installer which validates if the installer action (Repair/Remove) was launched from your application and not from ARP.
One way would to be pass a Custom Property from your application to the msiexec which is tested in your custom action (or Condition) and doesn't let the installer process proceed if executed without setting this property.
Upvotes: 0
Reputation: 13018
Just add a Setup project to your current solution. A setup project uses the Windows Installer technology which gives you the repair and remove option for free. Use this type of project when you have a "simple" installation. If you want more control (custom dialogs) you should install Wix. It plugs into VS and you can define an installation file in XML which is then compiled to a Windows Installer package.
Upvotes: 1