Mark B. – tech

Create Uninstaller inside Installer wizard : Visual Studio

Creating a setup wizard within Visual Studio does not include an uninstall shortcut with it. The easiest and quickest way would be to do the following. (assuming you already create a setup wizard)

  1. Create a batch file (say name it uninstall.bat) with the contents below@echo off
    msiexec /x {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

    Where {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} is the product code that is found in your setup project’s product code. Make sure you include the brackets as well.

  2. Under Application Folder, right click, choose ADD, then FILE and browser to where uninstall.bat is located.
  3. Under User’s Program Menu, right click and create a shortcut. Then browser to Application Folder and choose the uninstall.bat file that you just added.
  4. Rebuild your project and voila! Your uninstall shortcut is now included when the setup wizard installs your application.
Advertisements
This entry was published on June 15, 2011 at 4:28 am and is filed under IT - Tutorial. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: