Windows – How to run a program with Administrator permissions on startup, and minimize to tray

bootuacwindows 7

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?

Best Answer

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.

Related Question