-
Jun 14th, 2014, 02:50 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Get WinKey without Admin Rights ?
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?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.
-
Jun 14th, 2014, 06:53 PM
#2
Addicted Member
Re: Get WinKey without Admin Rights ?
-
Jun 15th, 2014, 06:23 AM
#3
Thread Starter
Frenzied Member
Re: Get WinKey without Admin Rights ?
Originally Posted by Noob13
Just had a look at this and its more of an external info display rather than some info I can run & get internally.
My problem is with getting rights & opening the Registry Key with RegOpenKeyEx & RegQueryValueEx [KEY_ALL_ACCESS + KEY_WOW64_64KEY] etc...
Any ideas?
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.
-
Jun 15th, 2014, 06:55 AM
#4
Addicted Member
Re: Get WinKey without Admin Rights ?
Computer Enterprise Masoud Keshavarz
For more information contact masoudk1990@yahoo.com
-
Jun 15th, 2014, 07:16 AM
#5
Thread Starter
Frenzied Member
Re: Get WinKey without Admin Rights ?
Originally Posted by masoudk1990
Hi, just checked but not really. That Thread is about Run as administrator automatically
I don't want to shell or run the app as Admin.
I just need to read a Key that is mainly available when the app is run as an admin.
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.
-
Jun 15th, 2014, 11:40 AM
#6
Re: Get WinKey without Admin Rights ?
Last edited by jpbro; Jun 15th, 2014 at 11:47 AM.
-
Jun 15th, 2014, 11:42 AM
#7
Re: Get WinKey without Admin Rights ?
Last edited by jpbro; Jun 15th, 2014 at 11:48 AM.
-
Jun 15th, 2014, 11:43 AM
#8
Re: Get WinKey without Admin Rights ?
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.
-
Jun 15th, 2014, 12:26 PM
#9
Thread Starter
Frenzied Member
Re: Get WinKey without Admin Rights ?
Originally Posted by jpbro
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.
You're right, KEY_ALL_ACCESS was asking too many rights which i don't need.
KEY_READ is all i needed.
Nice 1 jpbro...
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.
-
Jun 15th, 2014, 04:54 PM
#10
Addicted Member
Re: [RESOLVED] Get WinKey without Admin Rights ?
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))
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|