Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the environment variable for AppData in NSIS installer script?

I am looking for the environment variable for AppData in NSIS. I need to copy fils to the AppData directory in my installation.

like image 790
kakka47 Avatar asked Jun 13 '11 08:06

kakka47


2 Answers

It can't be easier than this $APPDATA, you can do something like this:

SetShellVarContext all
!define INSTDIR_DATA "$APPDATA\MyApp" ; call "SetShellVarContext all" before!
like image 179
sorin Avatar answered Oct 25 '22 23:10

sorin


$APPDATA is already defined as constant in NSIS.

The application data directory. Detection of the current user path requires Internet Explorer 4 and above. Detection of the all users path requires Internet Explorer 5 and above. The context of this constant (All Users or Current user) depends on the SetShellVarContext setting. The default is the current user.

like image 39
Slappy Avatar answered Oct 25 '22 22:10

Slappy