1

I want to perform one security mechanism, but I don't know whether it is possible.

I want to Shutdown/Turn Off PC/System when any USB device attach to it.

jonsca
  • 4,084

1 Answers1

1

First of all, make sure you know what your doing, shutting down a computer when any USB device attaches to it could put you in a hard spot when you try to connect your Keyboard for example.

With that disclaimer out of the way, Windows Scheduler would be the easiest way to accomplish this. Write a little batch script that shuts down the computer:

@echo off
shutdown \p

And set a scheduled task using Windows Scheduler to run that batch script every time a USB device is inserted. And your done!

tbenz9
  • 7,175