When performing commands with the Windows Command Prompt of Windows File Explorer, have you ever been instructed to “Go to your User Profile” or “Open your temporary file folder” without a clear indication of how to do this?

Windows %shortcut% commands to the rescue!

There are common Windows Environment Commands that can be helpful to reach various locations on your computer quickly in order to begin diagnosing and fixing computer related problems, including viruses.

Why not just manually “cd” or navigate to the location we need?  

  1. Over the years, different versions of Windows have used different directories (folders) for files.  Windows has built in %shortcuts% to help users to locate files regardless of which version of Windows.  In this manner, learning these shortcuts means you can locate the files you needed quickly regardless of the version of Windows being worked on.
  2. A Windows computer username is unique to the person that set up the computer.  A username might be a personal name, a job position, the name of a pet, the name of the company, etc.  This means that potentially, every Windows computer username is essentially unique.  You can imagine the time saving of using a shortcut rather than looking for the active username.
  3. Not only is every username potentially unique, but one computer can have several usernames, for different co-workers, different family members, or even different security levels.
  4. Usernames that contain spaces must be encapsulated inside of quotes.  %shortcuts% does this for you without the need to know when or how to do this.

Using Windows Command Box and %shortcuts%

Our first technique is to use the Windows Command Box and our shortcuts to quickly navigate around the computer.  This may be possible using the Windows File Manager as well, which is discussed later.

Need Personalized Virus Removal Assistance?

Get expert help today.

If you're not already a VirusRepairNow.com customer, our Certified Virus Removal Experts are available to clean, optimize and secure your system. Call 1-855-868-4787 or click to schedule an appointment with VirusRepairNow.com today!

  1. In the bottom left corner of Windows, click [Start] or windows start orb or windows start flag.
  2. Begin typing and type:  cmd
  3. Press [Enter] to run the Command Prompt program.

In the Windows Command Box, the following Windows Environment Commands will save you time.  Type the commands to quickly navigate to various locations throughout the computer.

cd %userprofile%

Changes directory (folder) to the currently logged in User Profile.  Normally this is “C:\Users\[User]” where “[User]” is the current user.  The %userprofile% folder contains folders such as Desktop, Documents, Downloads, Favorites, Music, Pictures, Videos.

cd %systemroot%

Changes the “HomeDrive” directory (folder) to the Windows folder.  Normally this is C:\Windows.

cd %appdata%

Changes directory (folder) to the User’s AppData folder.  Normally this is C:\Users\[User]\AppData\Roming.  The AppData folder is hidden by default.

cd %localappdata%

Changes directory (folder) to the User’s Local AppData folder.  Normally this is C:\Users\[User]\AppData\Local.

cd %programfiles%

Changes directory (folder) to the User’s Program Files folder.  Normally this is C:\Program Files.

cd %temp%

Changes directory (folder) to the temporary files folder.  Normally this is C:\Users\[User]\AppData\Local\Temp.

“HomeDrive” Note

The commands above assume you are on the “HomeDrive”, which is typically C:.  If you are on a different drive, such as D: and issue the above commands, it doesn’t change the directory (folder) on D:, but rather, it changes them on the C:.  Upon returning to the C: you will see that the location was updated.

  1. C:\>d:  In the example below, you can see we start on the c:\ in the root folder.  We change to the D:
  2. D:\Shared>cd %userprofile%  The command to change to the %userprofile% is issued.
  3. D:\Shared>c:  After the command has been issued, we can see we’re still on D:\Shared.  We change to the C:
  4. C:\Users\Earth>  We can see the command did change the “HomeDrive” to the %userprofile% folder as requested.

Windows Environment Commands Homedrive

List of all Environment Variables

%shortcuts% are based on Environment Variables which are unique for each computer.  So how do you learn about all the Environment Variables?

  1. Open a Command Prompt (as described above)
  2. Type and then press enter:  set

You’ll be rewarded with a lot of information.  Some of the information can be used as %shortcuts%.  For example, you will see “ProgramFiles=C:\Program Files” in the list.  Above we used “cd %programfiles%”.  You can probably guess that we can use “cd programfiles(x86)” to change to the C:\Program Files (x86) folder.

Windows environment variables

Windows File Explorer (aka “My Computer”, “My PC”) %shortcuts%

The %shortcut% commands can also be used in the Windows File Explorer by simply typing or pasting in the %shortcut% and pressing enter.

  1. Start Windows File Explorer
  2. Click inside the “Search Bar” or “Location Bar”
  3. Type or paste in a short cut.
    Windows 10 File Explorer 2
  4. You will arrive at the requested location
    Windows 10 File Explorer 3

Advanced Info – Registry User Shell Entries

Where does Windows store the Windows Environment Variables?

User folders:  HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Public folders:  HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Registry folders associated with user profile

Closing

The above is not a comprehensive list of all the Windows Environment Commands, but are the commands commonly needed in part to repair a computer problem.

Roger Whittaker

Roger Whittaker

Head Computer-Virus-Removal-Expert-Dude at VirusRepairNow.com
My name is Roger and I run a small family owned expert virus removal company.

We serve computer users anywhere in the US that have virus infections using a remote connection over the Internet for immediate service.

I enjoy delivering expert quality and value to all my customers. In fact, I work extra hard so every virus removal is a 5 star experience!
Roger Whittaker