简体   繁体   中英

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.

THanks!

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!

$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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM