So basically I'm trying to execute a command when a system event takes place. I want to switch my active display to my monitor with %windir%\System32\DisplaySwitch.exe /external when the system detects a specific event, and then switch my active display to my TV with %windir%\System32\DisplaySwitch.exe /internal when another specific event happens. I can see these specific events happening in DebugView, but I'm not sure how I could make my system execute a command when it sees these events happen. Does anybody know how to accomplish this?