Download the Tom's Hardware App from the App Store
The reference for current tech news
Yes No
Ads

Auto run .bat

Forum Applications : Programming Auto run .bat

Word :    Username :           
 

I'm trying to have a batch file or even if possible just a txt file directly to auto run when a folder is opened up on a flash drive. Is this possible or is it only possible with .exe?

i made a file autorun.inf
then had the

[autorun]
open=me.txt

the me.txt is the name of the text file and i figured maybe couldn't open .txt so i tried making a .bat to run the .txt but it didn't work. Any suggestions on how to get that to work if possible. It seems so if it were a cd but seems harder for flash drive

Reply to solidussnake
Register or log in to remove.

The "open=..." will actually try to execute the text file itself which is very different than opening it. For Windows, you can always try "open=notepad me.txt" if that is what you wanted it to do.

Reply to Zenthar

Zenthar is correct. open=*** does not open the file, it executes code within the file.

------------------------------ http://www.danasoft.com/sig/Banshee292286.jpg
Reply to Bruceification73
Tom's Hardware > Forum > Applications > Programming > Auto run .bat
Go to:

There are 2003 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
  • Ask the community now
  • Publish
Ad
Ads
Latest best answer
Blu-Ray playback software recommendations?
By Rusting In Peace, 1 day ago:

My advice to you would to be avoid getting blu ray on PC it's totally annoying because of...

Best offers
They won a badge
Join us in greeting them
Top experts