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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autorun from CDROM 1

Status
Not open for further replies.

TudorSmith

Programmer
Jan 14, 2002
245
GB
Hi,

I want my EXE file to autorun from the CD when the user inserts the CDROM into the drive! Do I need an autorun.inf file on the CDROM, and if so, what comands to I put on the autorun.inf

Thanks

birklea
 
You indeed need an Autorun.inf file, in it the following lines (where start.exe is the program you want to run):

[autorun]
open=Start.exe
 
an other way is:

[autorun]
open = (executable)
icon = (icon file)
 
Birklea

The icon will be displayed in place of the standard cd-rom icon under My Computer.

Josh
 
Remember that VB programs have to be installed and autorunning a VB program will fail on PCs that dosn't have the VB runtime library installed.
-You can run a setup.exe file of course...
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Sunaj is right - you can't write a Autorun program using VB because you'll run into a chicken-and-the-egg problem -- how to install the VB runtime using a program written in VB.

An Autorun program needs to be written in Visual C, because the Visual C runtime is guaranteed to already be on the machine (much of the OS uses it!).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top