Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
Since the registry edit made by Process Explorer diverts attempts to run taskmgr.exe to itself you can use reg.exe to undo the edit when you want to run Task Manager as well as use it to restore the entry made by Process Explorer.
Because the registry entries to be removed/restored reside in HKEY_LOCAL_MACHINE reg.exe must run with Administrator privileges. To avoid having to deal with a UAC prompt for elevation I used scheduled tasks that will run elevated without prompting and set up shortcuts on the desktop to run them. The following examples were created for my Win1022H2 system. You would need to conform the file system locations for your own system. I have not tested this on Win 11.
Both scheduled tasks (that will be run on demand from a shortcut) run with elevated privilege as an Administrator.
Both used the same one-time trigger -
Both had the same settings options-
The task action to restore task manager (i.e., remove Process Explorer registry edit) -
The task action to restore the Process Explorer registry edit. The command string was very long so there are two images so you can see it all
Desktop shortcuts to run either scheduled task -
You might want to set these shortcuts to run minimized to avoid a flash on the screen when they execute.