Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   About The Environment Variable (http://forums.winamp.com/showthread.php?t=280131)

jiake 27th October 2007 16:08

About The Environment Variable
 
In the setup,some files should be insted to th directory "%AllUsersProfile%\Application Data\",but in NSIS help file,I didn't found any variable like "$AllUsersProfile",in Windows XP Pro,the default directory of "$AppData" is "%UserProfile%\Application Data\" or the full path "C:\Documents and Settings\Administrator\Application Data\".So I write the Script as follow:

SetOutPath "$%AllUsersProfile%\Application Data"

The problem is,in my computer,the environment variable "$AllUsersProfile" actually is the path "%SystemDrive%\Users\All Users",so if the setup is running in other computer,the files are also copy to the path "C:\Users\All Users",But,this is not what I want,I want the files be insted to their default "C:\Documents and Settings\All Users",how to write the script?it puzzled me.

kichik 27th October 2007 16:10

Use $APPDATA along with SetShellVarContext all. $%AllUsersProfile% is, as you said, the path to that folder on your computer and not the user's.


All times are GMT. The time now is 17:51.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.