We have a service (runs as the SYSTEM user) which uses WMI to get the volume serial number of the drive Windows is installed. However, we have a client whose WMI security is too restrictive and we cannot query the volume serial number in this way.
Rather than learning the ins-and-outs of WMI security permissions, I wanted to use the native Win32 function GetVolumeInformation to get this information. However, I don't know if this call uses WMI to get this info from the drive, or if it just uses something which is set in the registry (or some other easily accessible place) where it can be changed by a normal user (I know the volume serial can still be changed if you really know how).
Is GetVolumeInformation a viable workaround for circumventing WMI? And if not, what is the best way to get this information in C# without using WMI calls?