How to create an Autorun file for your USB/DVD/CD
If you have created a program and want to let it autorun when someone inserts a USB/DVD/CD in their PC, then all you need to do is burn a small file with that program. In this post, we will explain how to create a simple and advanced Autorun file.
When do you need an Autorun File
Say you have a program “XYZ.EXE” and you want to run it automatically when you insert your USB/DVD/CD. Typically Windows look for an information file called Autorun.inf. Its a simple text file that contains information on which program Windows should automatically launch when the storage device is inserted. In other words, autorun.inf tells Windows how to deal open the presentation and treat the contents of the CD.
Create an Autorun file for your USB/DVD/CD
To enable AutoRun, you need two essential files— An Autorun.inf file and a Startup application or executable.
Follow the steps to create one for your application.
Open Notepad, and write the following line as it is:
[autorun]
Save it as “Autorun.inf”
Now burn your CD/DVD with the autorun .inf file included. In the case of a USB drive, you need to copy and paste the INF file in it.
How to further enhance the Autorun.inf File
Use this instead:
[autorun] OPEN=SETUP.EXE ICON=SETUP.EXE,0 shellconfigure=&Configure... shellconfigurecommand=SETUP.EXE shellinstall=&Install... shellinstallcommand=SETUP.EXE shelladmin=&Launch the Office Customization Tool shelladmincommand=SETUP.EXE /admin shellcmdline=setup &Controller Command-Line Help shellcmdlinecommand=SETUP.EXE /?
It will add a right-click context menu that can be tailored for your application. You can choose to target particular executables inside the storage device, add an icon, and so on.
Read: How to enable or disable AutoPlay in Windows 10.
Autorun.inf Generator
If you find it hard to use a notepad to generate an Autorun file, then you can use this simple program called Autorun.inf Generator which allows you to create it easily.
When you launch the program, you get options to add the following:
- Autorun Executable
- Autorun Icon
- Drive label
- Context menu ( Two)
- Autorun link
- Support Link
That’s about it.
I hope the post helps you create the Autorun file for USB/DVD/CD media.