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
  1. Home
  2. General Programming
  3. Windows API
  4. Elevation of process

Elevation of process

Scheduled Pinned Locked Moved Windows API
comjsonquestion
5 Posts 4 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.
  • J Offline
    J Offline
    Jorgen Sigvardsson
    wrote on last edited by
    #1

    Is there a way to elevate a process's privileges dynamically? I don't want the process to be administrator all the time. It is only during a critical moment I want to elevate the privileges (I'm starting and stopping a service). I've seen solutions elevating a COM object, but that seems a bit far fetched! Surely there ought to be some API call that elevates the currently running process? Hints, suggestions are welcomed in any programming language.

    P M 2 Replies Last reply
    0
    • J Jorgen Sigvardsson

      Is there a way to elevate a process's privileges dynamically? I don't want the process to be administrator all the time. It is only during a critical moment I want to elevate the privileges (I'm starting and stopping a service). I've seen solutions elevating a COM object, but that seems a bit far fetched! Surely there ought to be some API call that elevates the currently running process? Hints, suggestions are welcomed in any programming language.

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      This article may be of help. Regards, --Perspx

      "Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
      BSoD during a Win98 presentation

      J 1 Reply Last reply
      0
      • P Perspx

        This article may be of help. Regards, --Perspx

        "Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
        BSoD during a Win98 presentation

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #3

        Not quite what I had in mind, but it does give some valuable research. I'll look into it a bit better at work tomorrow morning. Thanks for the link!

        L 1 Reply Last reply
        0
        • J Jorgen Sigvardsson

          Not quite what I had in mind, but it does give some valuable research. I'll look into it a bit better at work tomorrow morning. Thanks for the link!

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Yep, I tried that before, it works, but obviously it launches the UAC dialog, so the user will still have to confirm your good intentions... :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          Voting for dummies? No thanks. X|


          1 Reply Last reply
          0
          • J Jorgen Sigvardsson

            Is there a way to elevate a process's privileges dynamically? I don't want the process to be administrator all the time. It is only during a critical moment I want to elevate the privileges (I'm starting and stopping a service). I've seen solutions elevating a COM object, but that seems a bit far fetched! Surely there ought to be some API call that elevates the currently running process? Hints, suggestions are welcomed in any programming language.

            M Offline
            M Offline
            Michael Dunn
            wrote on last edited by
            #5

            Jörgen Sigvardsson wrote:

            Is there a way to elevate a process's privileges dynamically?

            No, a process's integrity level can only be set when it is launched. The common way to temporarily elevate uses a COM object because it gets instantiated by the OS in a separate elevated process.

            --Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen

            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