473,394 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Autorun on USB Flash Drive

I know this is probably not the proper newsgroup to ask this question,
but I do not know which one is. And most of you guys here know a lot
about windows programming so I am taking a chance some one here may be
able to answer this simple question.

If I burn a CD/DVD and include a file in the root of the burned disk
called Autorun.inf and the contents of it is:

[autorun]
open=C:\Program Files\myProgram.EXE

then when the CD/DVD was inserted in the drive, the program at
C:\Program Files\myProgram.EXE would automatically launch.

I would like to do this same thing on a USB Flash drive. I have tried
it but it does not launch the application.

What is the magic incantation?
Dec 23 '06 #1
2 8498
Google is your friend, try searching: enable autorun usb flash drive

Most USB drives don't support it without software installed on the
computer..

"Joe Cool" <jo*****@home.netwrote in message
news:6d********************************@4ax.com...
>I know this is probably not the proper newsgroup to ask this question,
but I do not know which one is. And most of you guys here know a lot
about windows programming so I am taking a chance some one here may be
able to answer this simple question.

If I burn a CD/DVD and include a file in the root of the burned disk
called Autorun.inf and the contents of it is:

[autorun]
open=C:\Program Files\myProgram.EXE

then when the CD/DVD was inserted in the drive, the program at
C:\Program Files\myProgram.EXE would automatically launch.

I would like to do this same thing on a USB Flash drive. I have tried
it but it does not launch the application.

What is the magic incantation?

Dec 23 '06 #2

see this link http://www.microsoft.com/whdc/device...ge/usbfaq.mspx for
full details

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.

For more information about the StorageDeviceProperty, see the
STORAGE_DEVICE_DESCRIPTOR storage structure in the Windows DDK, located at
http://msdn.microsoft.com/library/de...656e9a.xml.asp.

For more information on Autorun.inf files see the "Creating an
AutoRun-Enabled Application" article located at
http://msdn.microsoft.com/library/de...asp?frame=true.

regards

Michel Posseth [MCP]

"Joe Cool" <jo*****@home.netschreef in bericht
news:6d********************************@4ax.com...
>I know this is probably not the proper newsgroup to ask this question,
but I do not know which one is. And most of you guys here know a lot
about windows programming so I am taking a chance some one here may be
able to answer this simple question.

If I burn a CD/DVD and include a file in the root of the burned disk
called Autorun.inf and the contents of it is:

[autorun]
open=C:\Program Files\myProgram.EXE

then when the CD/DVD was inserted in the drive, the program at
C:\Program Files\myProgram.EXE would automatically launch.

I would like to do this same thing on a USB Flash drive. I have tried
it but it does not launch the application.

What is the magic incantation?

Dec 27 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: duha | last post by:
Writing my own flash screen and autorun.exe in VB .NET. In most commercial packages the autorun flash screen includes at least three buttons: "Install", "Browse CD" and "Quit." Hitting the...
6
by: AOECheatmaster | last post by:
I am trying to write a C++ autorun launcher, but i have a problem, i cannot figure out how to set the buttons to launch the apps to use whatever drive number the CDROM is located at, all i can...
1
by: liznitch | last post by:
I'm trying to create an autorun menu for a disc, using flash. I would like the buttons to open files on the disc. Can anyone tell me how to script this? Thanks. Liz
2
by: tmWin | last post by:
Hi all I wanna run my application directly from a Flash Disk. I want it AUTORUN once the device is attached. I have seen some virus script-programs which create their own autoruns on a...
5
by: Orv | last post by:
I have a database set up where I want to export the records to a cd. I want to be able to create an autorun cd and have it based on HTML so when it opens, the user can click on various links and it...
9
by: Miro | last post by:
Wondering if anyone here has come up with a different solution than I keep coming back to: Here is a thought and I just can't seem to come up with another solution other than to install my old...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Description NOTE- If you are unfamiliar with the concept of autoruns, then read "Windows Autorun FAQs: Overview". Que-1: How can I safely remove or edit the autorun...
2
by: visweswaran2830 | last post by:
Hi, I want to create autorun.inf file. While I am inserting pendrive that autorun.inf file should run and execute my program. but I tried with this following codings.. open=myapp.exe ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.