%SystemRoot%
seems to be C:\Windows
. %windir%
is another environment variable that also points to this location. %SystemRoot%
is also found in the registry as value of Directory
under the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows
. %SystemRoot%
can be queried with wmic os get WindowsDirectory
%SYTEMROOT%
can be opend in cmd.exe with start
(if %SystemRoot%
is in %PATH%
which it usually is). The following example opens the fonts
folder below C:\windows
C:\> start fonts
Win+R
and then typing the folder name. %SystemRoot%
. %SystemRoot%
is not a real environment variable but is kind of hardcoded into the kernel while %windir%
is an ordinary whose value is set in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
and usually assigned the value of %SystemRoot%
. %SystemRoot%
is determined when Windows is installed. %CSIDL_WINDOWS%
also points to %SystemRoot%
. However, I found that not to be the case. bfsvc.exe | Boot File Servicing Utility |
bootstat.dat | |
DtcInstall.log | |
explorer.exe | Windows Explorer |
HelpPane.exe | Microsoft Help and Support |
hh.exe | Microsoft® HTML Help Executable |
lsasetup.log | |
mib.bin | |
notepad.exe | Notepad |
PFRO.log | |
Professional.xml | |
regedit.exe | GUI based registry editor. |
setuperr.log | |
splwow64.exe | Print driver host for applications |
system.ini | |
twain_32.dll | Twain_32 Source Manager (Image Acquisition Interface) |
win.ini | |
WindowsUpdate.log | |
winhlp32.exe | Windows Winhlp32 Stub |
WMSysPr9.prx | |
write.exe | Windows Write |
%windir%
might be: bcdedit.exe
: C:\> bcdedit.exe /enum … Windows Boot Loader ------------------- … osdevice partition=C: systemroot \WINDOWS
KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
. System.Environment+SpecialFolder
. msinfo32.exe
get-computerInfo | select-object osWindowsDirectory