Page 1 of 1

Getting Application Folder

Posted: Tue Feb 13, 2007 12:49 am
by flyguy
How do I get the folder that corresponds to:
"c:\\documents and settings\\all users\\application data\\" in XP or
"c:\\ProgramData\\" in Vista?

I noticed the MyAppData variable corresponding to System->Application Data Directory, but it appears to be the roaming user profile.

I would think that there would be variables for:
Local App User Data
Local App User Data (roaming)
Shared App Data

These locations are especially important when making installs for Vista.

Thanks

Posted: Tue Feb 13, 2007 1:22 am
by MichaelNesmith
Did you try all the available options in Get Folder Location?

Posted: Tue Feb 13, 2007 12:57 pm
by seanmckenna
I had this issue and the solution was to check the "get for all users" option in Get Folder Location system -> application data. This way I can get the folder "C:\\ProgramData" in vista.

I have run into a similar issue. I am trying to get the 'Local User Data' folder in XP and in visa, and I can't find out how to do this. This is the folder I'm interested in:

XP: "C:\\Documents and Settings\\<username>\\Local Settings\\Application Data"
Vista: "C:\\Users\\<username>\\AppData\\Local"

In .net, I can get this folder with the following code:

System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);

Thank you.