Solved

%LocalAppData%

Posted on 2013-10-28
4
3,515 Views
Last Modified: 2013-10-29
if I understand %LocalAppData% means the Appdata/Local folder

but under Appdata, there are : Local,LocalLow and Roaming.
so what is the variable for LocalLow and Roaming ?

Thank you
0
Comment
Question by:jskfan
4 Comments
 
LVL 34

Accepted Solution

by:
Seth Simmons earned 167 total points
ID: 39607385
if you do set from the command prompt it will show all the defined variables

LocalLow doesn't have a default one but Roaming is APPDATA

C:\Users\Administrator>set | find /i "roaming"
APPDATA=C:\Users\Administrator\AppData\Roaming
0
 
LVL 52

Assisted Solution

by:Joe Winograd, EE MVE
Joe Winograd, EE MVE earned 167 total points
ID: 39607402
Yes, %LOCALAPPDATA% refers to <%USERPROFILE%\AppData\Local>. "Roaming" is actually %APPDATA% itself and refers to <%USERPROFILE%\AppData\Roaming>. There is no environment variable that I'm aware of for LocalLow, so you'd have to refer to it as <%USERPROFILE%\AppData\LocalLow>, which could be problematic, as discussed in this very interesting thread on LocalLow:

stackoverflow.com/questions/4494290/detect-the-location-of-appdata-locallow

Regards, Joe
0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 166 total points
ID: 39607782
You can also 'maneuver' there...  e.g.
%localappdata%\..\LocalLow
%localappdata%\..\Roaming
will get you to those locations.

You might not have ever noticed, but when you do a dir command those dots are the first things listed if you're not in the root directory. The single dot is the current subdirectory, and the double dot is the parent directly above the current subdirectory. So the 'relative paths' trick above means, take me to %localappdata% then to its parent folder then to the named folder.
Try it...
CD %localappdata%\..\LocalLow
from any folder should take you to
C:\Users\[username]\AppData\LocalLow
(assuming C: is where the Users folder is located).
Or paste %localappdata%\..\LocalLow into Explorer's address bar and hit Enter.

The . and .. locations come in handy navigating blindly in batch files, too.
e.g.
CD ..
moves up 1 level, no matter where the current folder.
0
 

Author Closing Comment

by:jskfan
ID: 39610106
Excellent!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A safe way to clean winsxs folder from your windows server 2008 R2 editions
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now