is there a way to set a batch file to automatically open when you insert a flash drive into a computer? (the flash drive has the batch file on it)
My best guess is you could try making an autorun.inf
In notepad type in:
[autorun]
open=haxxxx.bat
Then save it as autorun with the extention .inf. Stick it to the main directory of the flash drive (could be F:\, G:\, H:\, I:\,etc).
Plug in the flash drive again, double click it.
Report back if it works.
--AG
so, if i add the autorun, will it automatically run all bat files or can i specify which one? or where you referring to my specific file when you said haxxx?
The specific file I just named haxxxx :P
also, forgot to add this in my initial question, can i also set it to automatically run my .exe file i asked u about a couple days ago?
Yes.
[autorun]
open=lololololyourcomputerisdead.exe
so i can specify any file with this autorun command?....awesome
Quote from: Soap Mactavish on May 25, 2010, 07:04:50 PM
so i can specify any file with this autorun command?....awesome
Yup, it's also how easy Worms (viruses) can spread via Flash Drive. It's also why I disabled Autorun on my computer.
doesnt seem to be working on my Dell, but maybe it is because my batch file isnt "colorful enough" ill make a different one and get back to you.
The autorun didnt work so i asked my programming teacher and he said that i needed an autorun file. I asked him if .inf was the correct extension and he said he didnt think so, but he couldnt pull the one he thought was right off the top of his head either.
.inf is right, Ag gave you good info, you must have made a typo.
ill try it again then. right now I am more focused on autoruning the exe file atm