Visual Studio: Add Uninstall to Your Application


First let me send a shout out to my reference for this little tidbit of information:  How to add a Uninstall option in Visual Studio Setup project without writing code GoGoToTo created a very nice article on this.  I simply expanded it further to include getting your application “registered” so within BigFix it will show up as one of the registered apps.

First View your File System so we can add the special folder “System”

Uninstall and Register 1

If your application is x86, then we’ll want to add the msiexec.exe from the c:\windows\SysWow64 folder.

Uninstall and Register 2

Uninstall and Register 3

Left click to highlight the msiexec.exe file and in the properties window, adjust as indicated in the following image:

Uninstall and Register 4

Next we’ll need to add a shortcut to the “User’s Program Menu”.  In my example, I’ve created a sub-folder named after my application.  Click that folder and in the right window, right-click and create a shortcut.

Uninstall and Register 5

Navigate to the System Folder and select the msiexe.exe file.

Uninstall and Register 6

Uninstall and Register 7

Before we modify the shortcut’s properties, we’ll need to copy the ProductCode from the Setup Application Properties.

Uninstall and Register 8

Using that ProductCode, modify the shortcut’s properties as follows:

Uninstall 8a

Now we get to register our application… Open the Registry View.

Uninstall and Register 9

Under HKEY_LOCAL_MACHINE add the following sub-keys:

Microsoft\Windows\CurrentVersion\App Paths\[name of your exe]

Remember to specify the last key to “DeleteAtUninstall” = True

Add the following 2 string values with the values as shown.

Uninstall and Register 10

 

That’s it.  You now have an uninstall link that will be created upon installation of your app.  You will also have your application properly “registered” so BigFix can properly detect it.

4 thoughts on “Visual Studio: Add Uninstall to Your Application

  1. Pingback: How to use the BigFix Software Distribution Wizard « DanielHeth's Blog
  2. Pingback: bigfix.me | blog | How to use the BigFix Software Distribution Wizard
  3. Hi, I have followed the procedure and trying to install the application but facing “could not write value Microsoft\Windows\CurrentVersion\App Paths\ to key \new. verify that you have sufficient access to that key, or contact your support personnel. “

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s