Skip to content
⌘ NSIS Forum Archive

System Variable as InstallDir

3 posts

xcabur#

System Variable as InstallDir

Hello Together

I have a question and I hope you can help me. I want use the windows systemvariable %allusersprofile% as installdir variable in NSIS. But the systemvariable %allusersprofile% is not available as a default Constant. Is it possible to use this variable and set it as instaldir?

Thanks for Help
Red Wine#
There's $profile which is set to all/current depending on the SetShellVarContext.

Here's an alternative:

Function .onInit
ReadENVStr $R0 ALLUSERSPROFILE
StrCpy $INSTDIR "$R0\My Application"
;;;;;;
;;;;;;