[RESOLVED] Get WinKey without Admin Rights ?-VBForums
Results 1 to 10 of 10

Thread: [RESOLVED] Get WinKey without Admin Rights ?

  1. #1

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,230

    Resolved [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.



  2. #2
    Addicted Member
    Join Date
    Nov 2010
    Posts
    136

    Re: Get WinKey without Admin Rights ?


  3. #3

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,230

    Re: Get WinKey without Admin Rights ?

    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.



  4. #4
    Member masoudk1990's Avatar
    Join Date
    Nov 2013
    Location
    Persia
    Posts
    53

    Re: Get WinKey without Admin Rights ?

    Computer Enterprise Masoud Keshavarz
    For more information contact masoudk1990@yahoo.com

  5. #5

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,230

    Re: Get WinKey without Admin Rights ?

    Quote Originally Posted by masoudk1990 View Post
    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.



  6. #6
    Hyperactive Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    340

    Re: Get WinKey without Admin Rights ?

    Dupe
    Last edited by jpbro; Jun 15th, 2014 at 11:47 AM.

  7. #7
    Hyperactive Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    340

    Re: Get WinKey without Admin Rights ?

    Dupe
    Last edited by jpbro; Jun 15th, 2014 at 11:48 AM.

  8. #8
    Hyperactive Member
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    340

    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.

  9. #9

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,230

    Re: Get WinKey without Admin Rights ?

    Quote Originally Posted by jpbro View Post
    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.



  10. #10
    Addicted Member
    Join Date
    Nov 2010
    Posts
    136

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.