CreateShortCuts for all users
I create some shortcuts like this :
SetShellVarContext current
ReadINIStr $3 "$PLUGINSDIR\user.ini" "Field 3" "State"
StrCmp $3 "1" 0 +2
SetShellVarContext all
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\CitePlus1.lnk" "$INSTDIR\CitePlus1.exe" "" "$INSTDIR\deboeck.ICO"
CreateShortcut "$DESKTOP\CitePlus1.lnk" "$INSTDIR\CitePlus1.exe" "" "$INSTDIR\deboeck.ICO"
CreateShortcut "$QUICKLAUNCH\CitePlus1.lnk" "$INSTDIR\CitePlus1.exe" "" "$INSTDIR\deboeck.ICO"
In uninstaller I delete them like this :
SetShellVarContext current
ReadINIStr $3 "$PLUGINSDIR\user.ini" "Field 3" "State"
StrCmp $3 "1" 0 +2
SetShellVarContext all
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk"
Delete /REBOOTOK $INSTDIR\uninstall.exe
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\CitePlus1.lnk"
Delete /REBOOTOK "$DESKTOP\CitePlus1.lnk"
Delete /REBOOTOK "$QUICKLAUNCH\CitePlus1.lnk"
When SetShellVarContext is set to current, the shortcuts are deleted, but when SetShellVarContext is set to all, only the shortcut in the quicklaunch bar is deleted (apparently because NSIS doesn't create the quicklaunch shortcut in All Users but in Current User).
Any ideas?
Lieven