Old 9th April 2017, 18:03   #1
Junior Member
Join Date: Apr 2017
Posts: 10
Manage user profile


My software use some parameters which can be configured by each person. I keep the user profile in text or xml files. My software default installation location with NSIS is Program Files.

The problem is that the user can't modify his profile since the user configuration file is in ProgramFiles (even if he is admin, it does not work).

The easy solution would be to install the program to somewhere accessible such as C:\Users\Public. I don't know if there's a way to set this folder as default but I could just write I guess: InstallerDir "C:\Users\Public\MyProgram" instead of InstallerDir "$PROGRAMFILES".

However, I am not sure that it is the clean/good way of doing this. I guess the good way would be to install my program in ProgramFiles and to set up another folder (such as Users\Public) to place the profile files.
However, I don't know how to
1) Set this up with NSIS
2) I don't understand how I will tell my program to go get the files in this folder since the path to the user profile is already compiled in my program.

Thank you very much !

alecs26 is offline   Reply With Quote
Old 9th April 2017, 18:23   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,760
Application data should be stored in $AppData and/or $LocalAppdata. Use SHGetFolderPath to get this path in your application.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 9th April 2017, 19:46   #3
Junior Member
Join Date: Apr 2017
Posts: 10
Thanks !
alecs26 is offline   Reply With Quote
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump