Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autorun 2 files? 1

Status
Not open for further replies.

scottyjohn

Technical User
Nov 5, 2001
523
GB
Hi guys and gals,
Is it possible to run 2 executables from one autorun.inf file on an autostart CD? If so what would be the format? Hope this helps
John
 
Maybe not the most ideal, but:

Autorun=Autorun.bat

In the .bat file, put these three lines:

D:\File_One
D:\File_Two
EXIT


Obviously replace the two directories above with wherever your files are kept. Also, it might be worth putting 'START' in front of the two first lines.

Hope this helps...
 
Thanks for the help!
Ive never got involved with .bat files or anything before so could you give me the correct syntax assuming that the files I want to load are file1.exe and file2.exe both located in the root of the CD.

Thanks again for the help! Hope this helps
John
 
OK, try putting in the following (assuming D is your CDROM):

@ECHO OFF
CLS
START D:\FILE1.EXE
START D:\FILE2.EXE
EXIT


It might be worth typing this into a batch file and then running it (substitute D for you local HDD so you don't waste a CD) to make sure it works.

Regards.

Also, just as a little tutorial, heres an explanation of what each line means:

@ECHO OFF
You won't actually need this, I just put in by habit. Theres a command called ECHO which displays the text after it, and if you don't use @ECHO OFF, it would say, for example, ECHO Hello, rather than Hello.

CLS
Clear Screen

START D:\FILE1.EXE
Launches whatever is specified

EXIT
Obvious

Hope this helps.
 
Forgot to mention, in case you don't know how to create batch files:

1. Open Notepad
2. Type in the above syntax
3. File -> Save As
4. Set file type to 'All Files'
5. Call the file *.bat (must have the .bat extension)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top