Archive: Uninstall at Add/Remove Program


Uninstall at Add/Remove Program
  Hi,

Does anyone know how to make the installer do something such that the user who installs the program is able to uninstall it at the Add/Remove Programs in the Control Panel?

Currently I am only able to uninstall through the uninstall icon at my shortcut.

Thanks.


Make a key with your program name under the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
In your own key, you have to add two strings:
DisplayName - The name of your program as it should be visible at Add/Remove programs.
UninstallString - The exe-file (with any parameters) that needs to be run in order to uninstall the program.

Don't forget to delete your key when uninstalling. Else it will remain in the Add/Remove dialog.
If you want any script code, just ask.


  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "DisplayName" "NSIS Example2 (remove only)"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Example2" "UninstallString"
See also: Example2.nsi in your Examples directory.

Thanks a lot for the information. Would try it out on my script.
:)


Does anyone know why perhaps the icon associated with the uninstaller doesn't show up in Add/Remove programs? (it just looks like the default window box and not the trash can that I've set for the uninstaller)


Use the DisplayIcon value.

See http://nsis.sourceforge.net/archive/...php?pageid=103


Hi,

The size that is showing up at the "Add/Remove Programs" for my program installed does not seem to be correct.

It is either overly small or overly large. Can everyone advice?
Thanks.
:)


There are more options than just putting your program name in add/remove programs wizard.

NoModify; DWORD; 0 or 1
NoRepair; DWORD; 0 or 1

Those 2 are used to decide if you should just have Remove on the button or if you want Add/Remove to display.

DisplayVersion; String
HelpLink; String
Publisher; String
Readme; String

Most of these are self explanitory, but if you're wanting to add more support for the users from the Add/Remove programs (a 'Click Here for Support Information' link will appear in your programs description) you can add any number of these values to the registry for your program section.

IE: HKLM Software\Windows\CurrentVersion\Uninstall\MyProgram