Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
windows 7 registry rget "ProductId", empty result
#1
Is there a way to get the product ID (not product key) from the registry?
I used this code, but the result is empty

Macro Macro27
Code:
Copy      Help
rget(_s "ProductId" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" HKEY_LOCAL_MACHINE)
out _s
rget(_s "ProductName" "SOFTWARE\Microsoft\Windows NT\CurrentVersion" HKEY_LOCAL_MACHINE)
out _s

I triple checked that " HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" contains a filled (not empty) string-type "ProductId" key.

The goal is to retrieve a value from the registry that identifies specific PC (a registry key that is always there).
I used 'product ID' because if you right click the "Computer" icon and then select "Properties" you immediately see the Product ID.
I assume that this ID is different for each PC. (a better suggestion, if there is one, is very welcome).


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)