Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

Solved: How To Make Flash Drive Start .bat Upon Plugin


(!)

mangatrekkie's Avatar
mangatrekkie mangatrekkie is offline
Computer Specs
Member with 186 posts.
THREAD STARTER
 
Join Date: Feb 2012
Experience: Intermediate
14-Jul-2012, 04:35 PM #1
Solved: How To Make Flash Drive Start .bat Upon Plugin
Does anyone know how to make a flash drive launch a program, in this case a .bat file launch immediately upon being plugged in? If so, can you please put easy copy and paste instructions down. I've looked online but none of these tips have worked so far.
Ent's Avatar
Ent   (Josiah) Ent is offline Ent is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 5,278 posts.
 
Join Date: Apr 2009
Location: United Kingdom
Experience: Intermediate
15-Jul-2012, 03:47 PM #2
In principle the way to do that is with an autorun.inf file on the root of the flash drive.
It's a simple text file that you can create in notepad, and name autorun.inf (not autorun.inf.txt!).
The first line should be
[Autorun]
Followed by the instructions.

That won't always work however; modern versions of Windows would only include batch file in the menu of possible actions when you plug the device in, and some people even opt to disable the facility completely for greater security. (After all, the same facility is only too easily abused by malware intending to infect the machine)
mangatrekkie's Avatar
mangatrekkie mangatrekkie is offline
Computer Specs
Member with 186 posts.
THREAD STARTER
 
Join Date: Feb 2012
Experience: Intermediate
17-Jul-2012, 07:05 PM #3
I have tried the autorun.inf thing, but always on Windows 7. Is that the problem?
Ent's Avatar
Ent   (Josiah) Ent is offline Ent is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 5,278 posts.
 
Join Date: Apr 2009
Location: United Kingdom
Experience: Intermediate
18-Jul-2012, 01:32 AM #4
Yes. As you can imagine, giving anything the power to execute on its own and without human intervention is an awfully good way to spread malware, so from Vista on they've been tightening up on such things. I have a vague memory that they'll still let CD autorun work (it being seen as harder for malware to infect a CD) but block the same facility on Flash drives.

I don't know of any other techniques for doing what you're after.
mangatrekkie's Avatar
mangatrekkie mangatrekkie is offline
Computer Specs
Member with 186 posts.
THREAD STARTER
 
Join Date: Feb 2012
Experience: Intermediate
18-Jul-2012, 12:10 PM #5
OK sounds good. Thanks!
loserOlimbs's Avatar
Computer Specs
Member with 7,800 posts.
 
Join Date: Jun 2004
Location: Wichita, KS
25-Jul-2012, 06:29 PM #6
As Ent said, there are some definite security concerns with autorun. I disable it on all my systems and 7 does by default now too.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑