Page 1 of 1
Get folder Location in Vista
Posted: Thu Feb 15, 2007 11:24 am
by seanmckenna
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"
I have tried all the options for Get Folder Location, but none of them will give me this path. In .net, I can get this folder with the following code:
System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);
Thank you.
Posted: Fri Feb 16, 2007 7:58 am
by MichaelNesmith
I think you can obtain this path from either the registry, or using Get Folder Location and then the Extract Path command. Let me know if none of these cover your situation!
Posted: Tue Feb 20, 2007 10:11 am
by seanmckenna
Thanks, but I can't find anything that will work with Get Folder Location. When I use Application Data Directory, I get the folder "C:\\Program Data" in vista, which is not what I want.
Isn't there some way to get the user's folder? Thanks.
Posted: Tue Feb 20, 2007 10:26 am
by H4nd0
It shouldn't matter. Vista sets up Junction points for backwards compatibility. Do a dir /a:h in C:\\ and in your user directory and you will see them.
Posted: Thu Sep 13, 2007 9:11 am
by ktroost
I also need to get the folder location:
C:\\Documents and Settings\\<username>\\Local Settings\\Application Data
or "C:\\Users\\<username>\\AppData\\Local" when using Vista
When uninstalling, my application leaves some files that were created after the install in a subfolder of the above folder.
Is it possible to retrieve this location? I have tried all options using Get Folder Location command. Please help...
Edit: I found out that %localappdata% holds the right folder location for Vista can you make an addition to the Get Folder Location command for this?
Local Appdata in XP and Vista
Posted: Wed May 28, 2008 6:04 am
by SimonL
I can get the Local Data directory in Vista by parsing the Appdata location and pruning the Roaming string, that doesn't work for XP though.
I'd also like the %localappdata% location added to the GetFolder command.
Re: Get folder Location in Vista
Posted: Mon May 03, 2010 5:11 pm
by MichaelNesmith
This behavior has been updated in Install
Aware 9 R2 as follows: the
Get Folder Location command now has a new parameter to directly obtain this folder path on all operating systems directly.
Please help yourself to a release candidate of Install
Aware 9 R2 to ensure it works to your satisfaction:
www.installaware.com/forum/viewtopic.ph ... 3&start=30