473,568 Members | 2,986 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8515
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.n etwrote in message
news:6d******** *************** *********@4ax.c om...
>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 StorageDevicePr operty request.

For more information about the SCSI Inquiry command, see the T10 committee
located at http://www.t10.org.

For more information about the StorageDevicePr operty, 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.n etschreef in bericht
news:6d******** *************** *********@4ax.c om...
>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
1612
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 "Browse CD" button displays a directory of the CD , then exits, leaving the directory on display.
6
2429
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 think of is to have it default to D:\, but then it won't work on most computers!!! Please help!!!
1
4331
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
3171
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 specific Flash Disk device. It would be very thankful If anyone could tell me about it.
5
2747
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 will show them the corresponding record. Any ideas? A template or merge would be great as not all the records from the DB would be going on the...
9
1337
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 VB6 cds'. I want to create a nice splashy screen that will run from ( Autorun.inf ) on a CD when a cd is installed.
0
9196
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 settings on my PC? Ans: I recommend that you backup all of your important data before trying anything mentioned in this article. When a person is tweaking...
2
4830
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 but not working. can any one help me
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7665
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.