Windows – Environment Path Variables

It is interesting, as an IT Guy of more years than I would ever care to truly admit, there has been an information set that I have found continually invaluable. This has been especially true when coding. That information set is Environment Path Variable. Sexy huh?

In a nutshell these are the short codes that point to specific folders on the Windows System. How are they useful I hear you ask? Imagine the situation, you need to roll out a new configuration file for an application that will sit in the Users Appdata folder. Do you want to start mucking about with user specific code, of course you don’t. Instead these short codes do the work for you:

VariableResultant Location
%CommonProgramFiles%C:\Program Files\Common Files
%CommonProgramFiles(x86)%C:\Program Files (x86)\Common Files
%HomeDrive% C:\ (Same as %SystemDrive%)
%ProgramFiles%C:\Program Files or C:\Program Files (x86)
%ProgramFiles(x86)%C:\Program Files (x86)
%SystemDrive%C:\ (Same as %HomeDrive%
%AppData%\Microsoft\Windows\Start Menu\Programs\StartupOpens Windows 10 Startup location for program shortcuts

The ones listed above are not the full list, they are the ones I have found most useful. There are a bunch more. If you want to see the full list along with the results for the system it is run on, launch a cmd window and type set then press enter.

Not much else to say except, you’re welcome.