when i make a setup file of my project and install it on a computer there is no uninstall file in my application folder , and I can only unistall it from ADD\REMOVE PROGRAMS , why can i add that?

It's already exist. if you go to add\remove program you'll find it + if you install the application and RErun the install file it gives you an option to uninstall the application. All in all nothing called uninstall file. uninstall option by default in install project.

I borrowed the steps from another forum:


Ø 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 can also use %systemroot%\System32\msiexec.exe)

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

Open a new notepad
write the following code

@echo off
msiexec/x {product code}

save it as my_name.bat
anywhere in ur pc.
then double click on it and program will be uninstalled.

Note- you can find the product code of your program when you are making the setup file of your project then you can have it in the properties of your setup.

This article has been dead for over six months. Start a new discussion instead.