Converting a drive letter to a Partition ID / Disk ID
Given a drive letter, how do I get the OSImage InstallTo Partition ID and Disk ID without using the registry? unixman83 The WMI class Win32_DiskPartition is what I need. Now to figure out how to use WMI to get this information from a drive letter. Win32_LogicalDisk is also useful, MSDN Example , and this stackoverflow answer . Update: Hmm, this doesn't work! Not in the Windows Installer anyway ( WMI is missing from Windows PE !!) so I am using the other answer QueryDosDevice (e.g. \\.\PhysicalDisk1\Partition0 ) and hacking it together. This sucks Microsoft, accept a damn path in your installer