(C) 2004 DriverEntry




Contact Us


Resources - System Root Path

[Last updated 16 June 2004]

This driver retrieves the System Root path and prints the output to the debugger.  This sample demonstrates the use of ZwOpenSymbolicLinkObject, ZwQuerySymbolicLinkObject, IoGetDeviceObjectPointer, and RtlVolumeDeviceToDosName. The path is found by opening then querying the symbolic link "\SystemRoot".  The drive letter is then found by calling RtlVolumeDeviceToDosName.  

Note, amongst other methods, it is also possible to retrieve the system root path from the registry HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PathName.  However, this sample was designed to show the use of certain API's thus these other methods fall outside the scope of this sample driver.

Download SystemRootPath for 32-bit Windows 2K/XP/2K3.  Source code only.

SystemRootPath.Zip (x86)