There's an entry in the registry that does the job: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup "BootDir" value may be boot drive.