Hi,
Im using various details of the system to generate a Unique ID. The Windows Product Key is One of them, but I can't obtain it unless the program is run as an Admin.
Is there a way to read this part of the registry with Normal user privileges?
Printable View
Hi,
Im using various details of the system to generate a Unique ID. The Windows Product Key is One of them, but I can't obtain it unless the program is run as an Admin.
Is there a way to read this part of the registry with Normal user privileges?
Something similar asked before:
http://www.vbforums.com/showthread.p...-automatically
Dupe
Dupe
I think you are requesting too many access rights (KEY_ALL_ACCESS), which is why you need administrator permissions.
If you are just trying to read a value then you should be requesting the minimum rights necessary. Try KEY_QUERY_VALUE or KEY_READ instead and see it that works.
Public Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))