Friday, May 28, 2010

Making Uninstaller for vb.net Application

VS2005 Code
-----------
Deployment VB.NET project (with uninstall file)
In Visual Studio.NET:
Ø File > Add Project > New Project > Setup & Deployment Project > Setup Project
(Enter name and location)
Ø Add (right-click in Application Folder > Add > Project Output):
· Primary Output
Ø If an error occurs about files that should be excluded > In Solution Explorer select your Setup project > Exclude those files (right-click > exclude)

Ø Build > Build ’name project’

In Windows:
-----------
Ø Create an Uninstall.bat file containing:
C:\WINDOWS\system32\MsiExec.exe /I{productcode}

(Path depends of your Windows version, check where your system32 folder is located)
(You’ll find the productcode in Visual Studio.NET > Tab Properties in the setup project you’ve just created)

Ø Open the setup project in Visual Studio.NET if you closed it
Ø Add (right-click in Application Folder):
· Add > Project Output > File > Uninstall.bat
· Create New Shortcut > Application Folder > Primary Output (enter a name)
· Create New Shortcut > Application Folder > Uninstall.bat (enter a name)
· Add > File > add .ico files you want to use for the shortcuts
Ø Shortcuts properties > ‘icon’ property (use the icons you’ve just added)
Ø Move the shortcuts to User’s Desktop/User’s Programs Menu (you can also create subfolders)
Ø Build > Rebuild ’name project’

1 comment:

  1. विजय कुमार जी, अगर आप हिंदी में लिखते तो हमारे जैसे लोग भी समझ लेते.आपका प्रयास बहुत अच्छा है अंग्रेजी सीखकर आपके ब्लाग पर दुबारा आंउगा.

    ReplyDelete