kzchris
7th September 2010 09:18 UTC
Instalation directory
Hi,
In my instalator I use
InstallDir "$PROGRAMFILES\foo"
as an installation directory.
In my program I use a configuration file (one for every user), which changes every time any user uses the program. The configuration file now is placed in the same directory as exe file.
The problem is in windows 7 when the user has not admin rights – my program have no rights to change the configuration file.
In which directory should I place the config file to solve the problem or what else should I do?
Regards,
Chris
Afrow UK
7th September 2010 09:26 UTC
Make a folder in $APPDATA.
Stu
kzchris
7th September 2010 09:38 UTC
Ok, thanks I will try.
Regards,
Chris
Wizou
7th September 2010 10:10 UTC
if you want the *same* configuration file to be accessible for all the users that have an account on the machine, don't forget to use
SetShellVarContext all
before
SetOutPath $APPDATA
kzchris
7th September 2010 22:50 UTC
How can I make InstallDir to point at $APPDATA for all users, if I can’t use “SetShellVarContext all” outside the section?
Afrow UK
7th September 2010 23:28 UTC
In .onInit you can do:
SetShellVarContext all
StrCpy $INSTDIR $APPDATA
Stu
kzchris
8th September 2010 11:20 UTC
It works ;)
Thanks