16

I have Sysinternals Process Explorer installed as the system's task manager (Win7 64). Since half of the metrics for anything started as service and processes started under other user accounts are either silently missing or shown wrong, I would like to run Process Explorer as administrator by default.
Selecting the appropriate item from the menu after failing to perform an action on a process or wondering why some metric is not at all plausible (e.g. no I/O happening when the disk is very obviously reading/writing gigabytes of data, such as during a system backup operation) certainly does "work", but is a recurring, major inconvenience.

The Run as Administrator checkbox in file properties works for tools that you launch by clicking on an icon or a launcher (such as e.g. Autoruns) although it triggers UAC in a sheer stupefying manner every time.
I understand this is a "Feature" of the super smart Windows security system that cannot be avoided other than by turning off UAC completely, which frankly is the second most stupid design decision I've seen in my life.

The bigger problem I'm facing, however, is that enabling said checkbox for Process Explorer will disable the task manager. Ctrl-shift-ESC shows a busy cursor for a fraction of a second and doesn't seem to do anything else. Selecting "Task Manager" from the context menu on the task bar shows an alert stating that higher privilegues are needed to complete this operation (duh, that's exactly what the user is asking for!). The secure attention sequence brings up the lock screen. Clicking on "Task Manager" there does nothing.
Unchecking the checkbox makes Process Explorer work seamlessly again, but it (unsurprisingly) runs as normal user.

Apparently, the Windows guys are concerned that some malware that has already completely subverted the system to a point where it can bypass the secure attention sequence might be able to launch a program as administrator. Good grief.

Is there a workaround to both have Process Explorer come up when hitting Ctrl-shift-ESC (or the attention sequence) and running as administrator?

2
  • Which, according to you, is the stupidest design decision you've ever seen in your life?
    – undo
    Mar 16, 2016 at 10:59
  • Preferrably, if a program needs some privileges (like most programs elevating do), say, for opening a network connection, or for going beyond its working set cap, or whatever it may be, you should know what the program intends to do (approximately, within a class of operations) and be able to allow or deny this behavior (and be able to make your decision permanent) without also allowing the program to change your browser settings, overwrite files in the system directory, or format the harddisk. Instead, you allow "changes to your computer" which is usually exactly what you don't want.
    – Damon
    Mar 16, 2016 at 11:14

3 Answers 3

12

RUN IT AUTOMATICALLY ON WINDOWS BOOT

Starting anything with administrator privileges on Windows boot is fairly easy, you have just to schedule a task. Here is how it is done for Process Explorer in Windows 8.1. Works in Windows 10 too.

  1. Press Win+S to open search charm, type in sched in the search field and choose a Schedule tasks option.

  2. Task Scheduler window will open, click the Create Task... from the right actions panel.

  3. On the tab General enter any name you like, and check the Run with highest privileges box in the bottom, just like this: enter image description here

  4. Go to the tab Triggers, push New... button, and set Begin the task to At log on, press OK: enter image description here

  5. On the tab Actions push New... button and set Action to Start a program; in the Program/script specify a path to the Process Explorer executable and finally in the Add arguments (optional) type in /t (this one will get Process Explorer started minimized to tray): enter image description here

Basically you're done here, press OK in the main Create Task window. The Process Explorer will start minimized with highest privileges once you log on. You can adjust rest of the settings to your preference, for example make this task run when computer is run on battery (useful for laptops).

RUN IT MANUALLY ON DEMAND

If it is needed to run the task on demand, you'll need to set it begin At task creation/modification at step 4. Also on the Settings tab, check the Allow task to be run on demand. The rest options should be the same.

Then create a shortcut on Windows desktop, set its Target:

C:\Windows\System32\schtasks.exe /run /tn "Process Explorer with Administrator Privileges"

(Note that the task name should be exactly the same as you set it during the task creation).

If you would like, you can set a Shortcut key in the corresponding field. Screenshot for a reference:

enter image description here

That's it, now you can double-click this shortcut or use a shortcut key you set to start any task with administrator privileges and even the annoying UAC will not interfere.

For the hint, thanks to the author of this answer.

5
  • 1
    This kind of "works" insofar as it does indeed start Process Explorer with maximum privileges, but not really as desired, as it will cause it to launch at every start and run all the time (minimized to tray), which is undesirable. Running a system monitor consumes very non-trivial amounts of CPU. There's days, weeks even, when I don't need this functionality at all (and then, I need it 30 times in one hour). My desire is to bring it up with a keypress when there's a runaway process or such. There seems to be no way of defining a trigger (at least I've not found one) which corresponds to either
    – Damon
    Mar 15, 2016 at 14:03
  • a key, or a key sequence (or the secure attention sequence, or whatever). If that existed -- maybe it does and I'm just unaware --, it would be the perfect solution.
    – Damon
    Mar 15, 2016 at 14:03
  • Oh, didn't understand now how I missed your whole point answering this 3 years ago... Anyway, there is a solution. I will update my answer right away. Mar 15, 2016 at 16:53
  • Apart from having that annoying shortcut visible all day (hiding it breaks the shortkey) this works perfectly, thank you. I'll accept your answer as such.
    – Damon
    Mar 16, 2016 at 10:56
  • Well, I've just hide all the shortcuts from the desktop (right-click on a desktop > View > uncheck Show desktop icons) and the shortcut key still worked for me. Need to say, I additionally clicked the desktop with a left key to be sure the focus is still on a desktop and not on some app. Mar 16, 2016 at 11:06
8

If you use the "replace task manager" feature you can just add /e to the starting command line in the registry to make it run as Administrator:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe]
"Debugger"="\"C:\\PROCEXP.EXE\" /e"
5
  • Can you add a sentence to your answer explaining what that does? Thanks.
    – fixer1234
    Mar 17, 2015 at 19:54
  • This one "works" insofar as it really starts the process and elevates it -- upon pressing the attention sequence, exactly as desired. Unluckily, it brings up the annoying consent dialog every time. Still, it ranks among the best solutions seen so far.
    – Damon
    Mar 15, 2016 at 14:05
  • Yes the UAC dialog is annoying but I've found no other way so far.
    – Trass3r
    Mar 16, 2016 at 21:28
  • 1
    @Trass3r A correct value for the registry value would be in the format: "D:\Programs\ProcessExplorer\procexp64.exe" /e. Your example does not work. Aug 28, 2019 at 21:18
  • 2
    @RăzvanFlaviusPanda You're wrong about @Trass3r's answer being incorrect. The value you have given in your gray box is what is seen in the Regedit dialog box. The answer @Trass3r has given is the contents of a complete .reg file to be imported into Regedit. Mar 4, 2020 at 15:26
2

First, create a ->Startup shortcut that points to Process Explorer so that it runs when you start windows.

Go to the properties for this shortcut and add the /t option. This tells Process Explorer to run as an administrator. I also use /e option which automatically bypasses the EULA nag that the tools author hates but was forced by the lawyers to add. So, my shortcut looks like this:

   "C:\Program Files\SysInternals\procexp.exe" /e /t

Finally, within Process Explorer, check "Hide When Minimized" from the Options menu. Now, when you close the window, Process Explorer will disappear to the system tray. Ctrl+Shift+Esc (or any other shortcut to Task Manager) will reopen your existing (Administrator) Process Explorer instance.

(To actually end the process, right click the system tray icon or use process explorer to kill itself. Tedious, but I rarely find the need for this.)

1
  • 1
    You're wrong, /t option merely starts Process Explorer hidden to tray. Apr 27, 2015 at 7:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .