07-31-2015, 02:12 PM
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
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).
I used this code, but the result is empty
Macro Macro27
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).