Quote:
|
Originally Posted by desnotes
I am working on an open source project that starts a Linux OS installed on an USB drive as a guest on top of a Windows or Linux host OS. One of the issues I am researching is getting th USB drive to autostart when it is plugged into a Windows XP host. From what I have found, there is way to make Windows think the USB is a CDROM by creating a partition that is read-only and sets certain flags. It is used on several USB drives (Geek Squad is an example) now to start menus and such but there is little information abou it and no code examples. I have tried Google.
I would like to know if anyone has any info on this and how to go about writing a program to accomplish this. I am fairly proficient in C++ but most o my programming is done with script/web languages.
Any Ideas?
Thanks,
desNotes
|
From "http://www.microsoft.com/whdc/device/storage/usbfaq.mspx"
Q: What must I do to trigger Autorun on my USB storage device?
The Autorun capabilities are restricted to CD-ROM drives and fixed disk drives. If you need to make a USB storage device perform Autorun, the device must not be marked as a removable media device and the device must contain an Autorun.inf file and a startup application.
The removable media device setting is a flag contained within the SCSI Inquiry Data response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the Removable Media Bit (RMB). A RMB set to zero indicates that the device is not a removable media device. A RMB of one indicates that the device is a removable media device. Drivers obtain this information by using the StorageDeviceProperty request.
For more information about the SCSI Inquiry command, see the T10 committee located at http://www.t10.org. This link leaves the Microsoft.com site
For more information about the StorageDeviceProperty, see the STORAGE_DEVICE_DESCRIPTOR storage structure in the Windows DDK, located at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage_r/hh/storage_r/structs-general_3c393126-f5c8-47d8-bfb5-6127ce656e9a.xml.asp.
For more information on Autorun.inf files see the "Creating an AutoRun-Enabled Application" article located at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/autorun/autoplay_works.asp?frame=true.