Autorun.inf

  • Thread starter Thread starter Brad Markisohn
  • Start date Start date
B

Brad Markisohn

Can anybody tell (or send me a reference) how a CD drive Autorun.inf works?
Is this a feature of the CD's device driver? Does the CD drive send a
message to the OS who, in turn, looks for and runs the Autorun.inf? I'm
trying to emulate this with a USB device, but I'm having trouble determining
if the USB device has to do something (e.g. send a specific message to the
OS) or if the driver would need to send a message and that isn't supported
in USB.

TIA

Brad
 
Brad Markisohn said:
Can anybody tell (or send me a reference) how a CD drive Autorun.inf works?
Is this a feature of the CD's device driver? Does the CD drive send a
message to the OS who, in turn, looks for and runs the Autorun.inf? I'm
trying to emulate this with a USB device, but I'm having trouble determining
if the USB device has to do something (e.g. send a specific message to the
OS) or if the driver would need to send a message and that isn't supported
in USB.

TIA

Brad


Method 1) The CD drive sends a signal to the bus when the disc is changed.
The O/S regularly polls for this signal (if you have "auto insert
notification" [AIN] turned on.) When the O/S notes that a disc has been
changed, it automatically searches for the autorun.inf in the root of the
drive (assuming you haven't disabled that feature.) The autorun.inf is
usually a very simple file, specifying only an icon to display for the drive
and a command line to launch when accessed.

Method 2) A user double-clicks the drive, and if autorun.inf is present, the
O/S default action is to follow the commands present within autorun.inf.

There isn't a lot of info on the web related to programming that describes
this function (either that, or my Google skills need sharpening) so I give
you this link that explains in more of an "end-user" language how autorun
and AIN works.

http://coolpagehelp.com/index.html?row2col2=autorun.html

AIN and autorun.inf are intended for CD/DVD media. Other drives will likely
not have an option for AIN, so your best bet may be a VB script or WMI
script that does this work for you. I have read that some people have
hacked small C++ scripts to achieve AIN for Flash readers, but can't find
any code samples.
 
Mike,

Thanks for the information.

Brad


Mike Brown - Process Manager said:
Brad Markisohn said:
Can anybody tell (or send me a reference) how a CD drive Autorun.inf works?
Is this a feature of the CD's device driver? Does the CD drive send a
message to the OS who, in turn, looks for and runs the Autorun.inf? I'm
trying to emulate this with a USB device, but I'm having trouble determining
if the USB device has to do something (e.g. send a specific message to the
OS) or if the driver would need to send a message and that isn't supported
in USB.

TIA

Brad


Method 1) The CD drive sends a signal to the bus when the disc is changed.
The O/S regularly polls for this signal (if you have "auto insert
notification" [AIN] turned on.) When the O/S notes that a disc has been
changed, it automatically searches for the autorun.inf in the root of the
drive (assuming you haven't disabled that feature.) The autorun.inf is
usually a very simple file, specifying only an icon to display for the drive
and a command line to launch when accessed.

Method 2) A user double-clicks the drive, and if autorun.inf is present, the
O/S default action is to follow the commands present within autorun.inf.

There isn't a lot of info on the web related to programming that describes
this function (either that, or my Google skills need sharpening) so I give
you this link that explains in more of an "end-user" language how autorun
and AIN works.

http://coolpagehelp.com/index.html?row2col2=autorun.html

AIN and autorun.inf are intended for CD/DVD media. Other drives will likely
not have an option for AIN, so your best bet may be a VB script or WMI
script that does this work for you. I have read that some people have
hacked small C++ scripts to achieve AIN for Flash readers, but can't find
any code samples.
 
Back
Top