Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Admin gets access denied

Admin gets access denied

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminjsonquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vipin_nvk
    wrote on last edited by
    #1

    Hello My application works only with administrative login because it has to access keys under HKLM in the PC and also works on process's to get their information like the process name and its other details. But though I have an administrative login in one of the PC's the RegOpenKeyEx() API with KEY_READ flag fails to read a particular key under HKLM (a key which is by default present on a PC installed with windows XP) Also, when I try to open a process using OpenProcess( PROCESS_QUERY_INFORMATION |PROCESS_VM_READ,FALSE, ProcessID), this API fails to open the process inspite of having SE_DEBUG_NAME privilege. What could be the reason for this? Is it possible that though a user has Admin privileges, access to the registry can be denied? Thanx.

    M 1 Reply Last reply
    0
    • V vipin_nvk

      Hello My application works only with administrative login because it has to access keys under HKLM in the PC and also works on process's to get their information like the process name and its other details. But though I have an administrative login in one of the PC's the RegOpenKeyEx() API with KEY_READ flag fails to read a particular key under HKLM (a key which is by default present on a PC installed with windows XP) Also, when I try to open a process using OpenProcess( PROCESS_QUERY_INFORMATION |PROCESS_VM_READ,FALSE, ProcessID), this API fails to open the process inspite of having SE_DEBUG_NAME privilege. What could be the reason for this? Is it possible that though a user has Admin privileges, access to the registry can be denied? Thanx.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      What are the error codes? Do the errors go away if you run the app as an administrator? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups