Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 29th, 2006, 9:57 AM   #1
desnotes
Newbie
 
Join Date: Nov 2005
Posts: 2
Rep Power: 0 desnotes is on a distinguished road
Auto-Start USB

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
desnotes is offline   Reply With Quote
Old May 30th, 2006, 5:39 PM   #2
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Great idea.. I'd definately use this software .

But I can't help you.
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old May 30th, 2006, 6:51 PM   #3
-=PARADOX=-
Programmer
 
-=PARADOX=-'s Avatar
 
Join Date: Oct 2005
Location: Portugal
Posts: 53
Rep Power: 3 -=PARADOX=- is on a distinguished road
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.
-=PARADOX=- is offline   Reply With Quote
Old Jun 2nd, 2006, 9:38 AM   #4
desnotes
Newbie
 
Join Date: Nov 2005
Posts: 2
Rep Power: 0 desnotes is on a distinguished road
Thanks for the information and links, Paradox. I am going through them and trying to find a starting point for the USB. Apparently, a USB can be partitioned with the first partition as read-only that simulates a CDROM while the second partition is a basic USB. Still trying to see what is expected.

desNotes
desnotes is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC