|
|
#1 |
|
Junior Member
Join Date: Feb 2008
Location: Near London, UK
Posts: 40
|
Uninstall info and MultiUser.nsh
Having read MultiUser/readme.html until I'm blue in the face, I still can't work out how one is supposed to get an installer to set up uninstall info in the registry ... HKCU for a 'current user 'install and HKLM for an 'all users' install. The documentation barely touches on what one might need to do in an uninstall script.
At least, this seems to be handled automatically for $INSTDIR, but what I'm trying to do is to get the startmenu folder name selected by the user during install -- commonly known as $ICONS_GROUP -- so that I can delete the shortcuts to the application during uninstall. I'm aware of the bug in which HKLM and HKCU are transposed, that's not the problem. Is there a worked example anywhere showing how to put MultiUser.nsh through its paces for both install and uninstall? Cheers, Daniel |
|
|
|
|
|
#2 | |
|
Junior Member
Join Date: Feb 2008
Location: Near London, UK
Posts: 40
|
Re: Uninstall info and MultiUser.nsh
Quote:
The installer contains the following definitions and section: code: ... which works when the installer is run by an administrator, but because it uses HKLM) not when run by a normal user. How do I rewrite this using MultiUser.nsh? Once I have that working it should be trivial to store the $ICONS_GROUP string in the registry as well, so I can recover it during uninstall. It looks as though MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY and MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME are what I need here ... but I have no idea how to use them. Cheers, Daniel |
|
|
|
|
|
|
#3 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
|
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Feb 2008
Location: Near London, UK
Posts: 40
|
Quote:
I presume one sets up definitions like these: code: (or something similar ... and does one need an extra '\\' at the end of the key?) ... but what then? How exactly does MultiUser.nsh use these values? How can I make use of this mechanism in my script to manage different values under the same (or a different) key? I have been trying to follow the source of MultiUer.nsh to see just what it does, but NSIS script language isn't the most readable language in the world (especially to a relative beginner). Googling for "MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY" produces precisely two hits, one to the MultiUser readme file and one to a boardreader.com page that doesn't appear to contain that string ... the web knows of no other documentation and no examples. How does one use this feature? Inquiring minds are keen to learn. Cheers, Daniel |
|
|
|
|
|
|
#5 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
For the uninstall info use SHELL_CONTEXT instead of HKLM. In addition, add the /CurrentUser or /AllUsers command-line switch to your uninstaller location.
You also need to set MULTIUSER_INSTALLMODE_COMMANDLINE. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|