How can I run a program with Administrator permissions on startup, and minimize to tray?

7,692

You can create a task in the Windows Task Scheduler where you run the procexp.exe command and make sure to check the "Run with highest privileges" on the general tab to run it in admin mode. On the trigger tab you should define the task to run "At log on".

This will run the command with admin privileges at startup without asking for UAC verification.

To make sure Process Explorer starts minimized to the tray you should use the /t command line switch as an argument for the command when you add it to the action tab of the scheduled task.

Share:
7,692

Related videos on Youtube

Iszi
Author by

Iszi

This is a canary message, to be removed in the case of my death. If you're reading this, I haven't died yet. Then again, how would you know? I mean, how could I possibly delete this message after my own demise? You know what? Just go ahead and assume I'm dead. Any posts appearing to be made by me are from an impostor who's stolen my identity post-mortem, and only further prove the fact that I am dead. After all, why would I even think to post a canary message if I was expecting to be alive to remove it anyway? In any case, I'm still not the droid you're looking for.

Updated on September 18, 2022

Comments

  • Iszi
    Iszi over 1 year

    I like to keep Process Explorer running full-time. I particularly like to use it to display several statistics (e.g.: Usage graphs for CPU, RAM, Network, GPU) in the system tray. However, some of these tray icons (as well as other Process Explorer functions I like having handy) require Administrator permissions to run.

    I've tried setting Process Explorer to run as Administrator on startup, and minimize to the system tray, by configuring the following:

    • In Process Explorer
      • Hide When Minimized
      • Allow Only One Instance

    • Shortcut in Start Menu -> Programs -> Startup
      • Run: Minimized
      • Advanced: Run as Administrator

    However, this causes one of the following:

    • Process Explorer won't run on startup.
    • Process Explorer will run on startup, but will require UAC response.
    • Process Explorer will run on startup without UAC prompt, but without Administrator permissions.

    My ideal solution would result in:

    • Process Explorer runs on startup, with Administrator permissions.
    • UAC response is not required to run Process Explorer on startup.
    • On startup, Process Explorer will be minimized to the system tray.
    • UAC can remain set at "Always Notify" and "Prompt for Credentials".
    • No additional software installations required.

    Is this possible?

    • Petra
      Petra about 11 years
      Have you tried the task scheduler? That should let you run it as administrator I'm not sure about minimised.
    • Iszi
      Iszi about 11 years
      @Col I have not tried Task Scheduler yet. If you have a process for configuring Task Scheduler in such a way that it meets the goals I've laid out in the question, please post it as an answer.
    • Austin T French
      Austin T French about 11 years
      I think what you really want is a performance monitor...?
  • cellepo
    cellepo over 8 years
    "you should use the /t command line switch" Could you give an example of that? Would it be like this, with /t replacing /c? /t start "Taskmgr" "C:\Windows\System32\Taskmgr.exe"