Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setup Poject - Uninstalling

Status
Not open for further replies.

0CODE

Programmer
Feb 8, 2004
63
CA
Im using the default Studio.NET Setup project window (VB.NET) and ive noticed when the unistall takes place from the control planel (only place) it only removes the files that were with the setup when it was lauched. Ex if a log file was created while the user was using the program it would not remove of that (or the root folder which everything was installed to)

My question is is there a way to delete all the files in that main root folder & even the root folder? Also is there a way to create an uninstall icon in a desired directory etc?

Thanks
 
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’


The setup is ready now. You can install via Setup.exe (default it’s located under the folder ‘Debug’, you can change it in Visual Studio.NET - right-click your setup project > properties > Output file name). The shortcuts will be added automatically in the coresponding folders (desktop/start menu).

You can uninstall the program via Uninstall.bat (or via shortcut naar Uninstall.bat)
 
well thanks alot for this, now that I can include an install icon too. but the problem still remains that it only removes the files that were created by the setup - not a log file for ex created when the program was running.

thanks alot though and if u know how to solve the following that would be great.
 
I'm still searching for that too. I can create Microsoft Access Databases with my program in any folder on any drive. When I uninstall the software, you should be able to delete those databases too.

It would be great if anybody knows how to solve this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top