You are here

Variables

3 posts / 0 new
Last post
Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2007-01-12 19:22
Variables

Hi
I'm making a program portable for my use, but i'm stuck with 2 folders:

C:\Documents and Settings\All Users\Application Data
C:\Documents and Settings\user\Local Settings\Application Data

These folders don't have a variable, the maximum that I could do is use %ALLUSERSPROFILE% and %USERPROFILE% but it wont work since "Application Data" and "Local Settings" changes its name in localized Windows versions.

Anyone may help me?

gluxon
gluxon's picture
Offline
Last seen: 4 years 5 months ago
Developer
Joined: 2008-06-21 19:26
Acutually, the program

Acutually, the program shouldn't be storing settings in the All Users folder, or else it would require administrative privileges to run.

The $APPDATA variable points to "C:\Documents and Settings\[USER]\Local Settings\Application Data"

And points to "C:\Users\[USER]\AppData" in Windows Vista.

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 8 months ago
Joined: 2007-01-12 19:22
.

$APPDATA points to C:\Documents and Settings\[USER]\Application Data
That is different of C:\Documents and Settings\[USER]\Local Settings\Application Data

But thanks anyway!

Edit: I've found that $LOCALAPPDATA points to it.
Edit again: Found that ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" gets the directory Biggrin

Log in or register to post comments