Autorunning program from CD or USB on Win7/8

2019-04-08 00:25发布

问题:

I work for an IT shop that sees some computers come in with rather nasty viruses. We are working an autorun script that will run a malware killing tool (RKill) when we insert a USB or CD (preferably USB.) We want to run the tool as soon as the USB or CD is inserted without having UAC popup, ideally anyway. Our second choice is to have it open the Autorun options, even on PCs that have been locked down a la FBI virus. We have autorun.inf, a .bat that calls a .exe, and the .exe for the tool we want to run in the root of the USB or CD. We have tried the solution found here, but that didn't work.

The code for autorun.inf and rkill.bat are below.
autorun.inf:

[autorun]
open=rkill.bat    
Where the autorun.bat file reads:
start rkill.exe

rkill.bat:

start rkill.exe

I understand that there may not be a reliable way to do this, but any help would be greatly appreciated.

回答1:

use this:

[autorun]
OPEN=rkill.bat
SHELLEXECUTE=rkill.bat
ACTION=run rkill.bat
ICON=rkill.exe,0

works for me! also, I run a pc repair shop also, so, a tip for you: use a boot disk

any of these work wonders:

Windows PE (with custom script)

Comodo Rescue Disc



回答2:

You could customize the autorun popup to include your exe. Don't know why your using a batch file to execute a program.

autorun.inf

[autorun]
ShellExecute=rkill.exe
UseAutoPlay=1

Don't know if this works, not at home atm. But doesn't hurt to try.

-D



回答3:

Alternate to Dimitri's answer above:

[autorun]
Open=rkill.exe
Icon=(icon file) <- OPTIONAL