[USB] Restart computer on input

win
Loyal Member
Joined
Jun 8, 2008
Messages
1,082
Reaction score
143
I want my computer to force restart when i plug in my Memory Drive into my USB port.

How does i do?
 
If I'm not mistaken its done via Autorun, someone correct me if I'm wrong but I think on windows, read up on it, use autorun to initiate a .bat that will cause a restart

---------- Post added at 04:20 AM ---------- Previous post was at 04:02 AM ----------

shutdown -r save this as a .bat
Then try
[autorun]
open=restart.bat
Save this as autorun.ini

---------- Post added at 04:26 AM ---------- Previous post was at 04:20 AM ----------

if that doesn't work post and I'll make ya an exe that does the same as restart but I don't wana be blamed for someone getting a virus lol :) Cause I think most protections detect the shutdown command as a virus but then again I have no idea at the moment
 
You can put an autorun.inf/ini into the root of the USB stick (pop up a CD and look at it's autorun to see the format)...

Or you could code something that just checks every few seconds whether the USB drive is there (and if it is, you could have it check for a special file to know that it's *THE* usb stick that's supposed to make it reboot) ... And when it sees it, do the reboot

The second idea is more reliable. The autorun can be disabled by holding shift, or by changing settings
 
Back