I've made a setup which during installation ask user to install the program for all user or for only current user.
When I choose to install for All Users - everything goes normal. When I choose to install for current user, the program is installed for current user but shortcuts are placed in directory for all users.
Here is my code:
Code: Select all
Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
if Variable ALLUSERS Equals TRUE
Get Common Folder Location System->Application Data Directory into MYAPPDATA
Get Common Folder Location System->Desktop Directory into DESKTOPDIR
Set Variable MENUSHORTCUTS to $SHORTCUTFILESALL$\$STARTMENU$
else
Get Folder Location System->Application Data Directory into MYAPPDATA
Get Folder Location System->Desktop Directory into DESKTOPDIR
Set Variable MENUSHORTCUTS to $SHORTCUTFILES$\$STARTMENU$
end
Also I've used message boxes to check the values of variables before and after Apply Install, variables are set correctly.
Has anyone an idea how to fix that?

