Shortcuts for current user
Posted: Tue Jul 12, 2011 12:52 am
Hi Everyone,
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:
Strange is that, when I'm debugging setup or installing with generating a log file - the shortcuts are placed in right directory, when I run the setup from double clicking or pressing run button in Installaware the shortcuts are installed for all users even I've choose to install for current user.
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?
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?