How To Create An Autorun File

Table of contents:

How To Create An Autorun File
How To Create An Autorun File

Video: How To Create An Autorun File

Video: How To Create An Autorun File
Video: How to create an Autorun file for your USB/DVD/CD 2024, December
Anonim

The creation of an autorun file for CD, DVD or USB disks does not require deep knowledge of programming languages and can be performed using standard Windows OS tools without using additional software.

How to create an autorun file
How to create an autorun file

Instructions

Step 1

Call the main system menu by clicking the "Start" button, and go to the "All Programs" item. Expand the "Accessories" link and start the Notepad application. Create a new text document. On the first line, type [autorun].

Step 2

The next line of the generated autorun file depends on the selected action. Type open = program_name.exeicon = icon_name.ico to start the selected program with the specified icon when a volume is mounted. Please note that both the file itself and the application icon must be placed in the root directory of the desired drive. Name the generated document autorun.inf.

Step 3

Use the syntax open = folder_name1 folder_name2 program_name.exe to specify the full path to the desired program if the destination is not the root directory of removable media. Specify the required argument after the program name, if necessary.

Step 4

If the purpose of the autorun file is to open images, HTML documents, or presentations, you must place a DOS command file in the root directory of the removable storage device. In this case, the batch file will open the required volume files using the default programs for that data type. Such an autorun file should look like open = autorun.bat index.htm. This DOS file assumes the following code: echo off @ start% 1% 2% 3% 4% 5% 6% 7% 8% 9 @ exit.

Step 5

Alternatively, you can use the ShellExecute = index.htm syntax to create such a file. Remember that the first line of any autorun file is always [autorun].

Step 6

If you need to use a custom command in an autorun file, the recommended syntax is shell command_name command = full_path_to_executable_application_file program_name.exe. Remember that in this case the command name should not contain spaces and be as short as possible.

Recommended: