I would like to trigger a windows service by plugging in a specific UBS stick. I found out, that I can use the sc.exe tool to add a trigger event on my service. The syntax in cmd should be like following:
sc triggerinfo *MyService* start/*myEvent*
My problem is, that I do not know, what the name of the custom trigger event for USB device insert is. It would also help very much, if someone could explain, what I can do to just trigger the Event, when a SPECIFIC device is inserted. Thanks in advance!
Edit: A much better option would be if I could implement this in my c# code. I am using Topshelf to create the service, if that information helps :P.