Alex Meyer-Gleaves

Getting the Windows Product ID using WMI

on c#, Windows, WMI

I needed to get the Windows Product ID from managed code recently and decided that using WMI would be the most reliable and stable way to get the job done. Do not follow any examples that show you how to get this information from the registry. You simply cannot rely on those registry keys being…