Search code examples
multithreadingoperating-systeminterrupttaskmanagerthread-priority

Custom OS interrupt like ctr + alt + delete


I'm using windows 8. Recently the task manager has been basically not working. It freezes and is just generally terrible.

What's more, as apposed to the earlier version of windows, the task-manager thread seems to not have the same priority that it once did. When I hit Ctr+Alt+Delete, the system immediately calls the home screen, but when I open task manager, I get lag.

What I want to do is create my own hotkey sequence to interrupt all systems with as much priority as possible. The notion here is an overclocking mentality, where if the hardware fails, that is more acceptable to me than a lag-lock lasting 5 minutes.

The idea of creating a custom hotkey seems realistically overly complicated. I recently began using 'resmon', and it is fantastic. If there was a way to launch resmon directly from the home screen, with high level priority, that would be an acceptable solution.


Solution

  • It sounds like you want to look at Windows Hook Functions, which allow you to run your own code at various points between the time when a keyboard event is received and when applications receive it.

    Additionally, if you don't want to write code, you can attempt to do the following two steps. This is untested because I do not currently have a windows box handy.

    1. Play with Image File Execution Options in the Windows Registry so that resmon will always get executed instead of the Task Manager, by setting it as the debugger for Task Manager in the following key.

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskmgr.exe
      
    2. Instead of using Ctrl-Alt-Delete, use the key sequence Ctrl-Shift-Esc which should attempt to bring up the task manager.