The user may need to remove your application to recover disk space or to move the application to another location. To facilitate this, provide an uninstall program with your application that removes its files and settings. Remember to remove registry entries and shortcuts your application may have placed in the Start menu hierarchy. However, be careful when removing your application's directory structure not to delete any user files (unless you confirm their removal with the user).
Your uninstall program should follow the conventions detailed in this guide and in the following guidelines:
Registering your uninstall program will display your application in the list of the Uninstall page of the Add/Remove Program utility included with Windows. To register your uninstall program, add the entries for your application to the Uninstall subkey.
HKEY_LOCAL_MACHINE
Software
Microsoft
Windows
CurrentVersion
Uninstall
ApplicationName DisplayName = Application Name
UninstallString = path [ switches ]
Both the DisplayName and UninstallString values must be supplied and be complete for your uninstall program to appear in the Add/Remove Program utility. The path you supply to UninstallString must be the complete command line used to carry out your uninstall program. The command line you supply should carry out the uninstall program directly rather than from a batch file or subprocess.