Puoi leggere la chiave di registro

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pro ductId