1

I have two PCs and a single set of peripherals between them. Whenever I want to switch PCs, I have to swap the monitor input, change audio source and switch over my peripherals by pressing a button on my USB switch. All but the last one can be done via software, so I'd like to condense the process down to just pressing a button.

The idea is to create a scheduled event that would trigger when a USB device (the 4-port USB switch) is disconnected. According to this question, these events are not logged by Windows, but can be captured by external programs. Is there any way to produce a Windows event from something like USBLogView?

Celos
  • 111
  • 3
  • 1
    Have you checked [this question](https://superuser.com/questions/219401/starting-scheduled-task-by-detecting-connection-of-usb-device)? It is a bit old but the involved subsystems have not changed that much in the last 10 years. – Robert Feb 08 '21 at 12:33
  • Thanks for the suggestion, @Robert. The question sadly doesn't have an applicable answer, as they all deal with an external drive being connected. That particular operation does have a corresponding Windows event, while other generic USB devices seemingly do not. – Celos Feb 08 '21 at 12:57
  • Then you may have to write a small tool on your own that waits for the USB device events and executes the command you want when the correct USB device event is recognized: The following project seems to be usable even if it also focuses on drives later but the first part should work: https://www.codeguru.com/columns/dotnet/detecting-usb-devices-using-c.html – Robert Feb 08 '21 at 13:15

0 Answers0