There are two kinds of people in this world.
Those with loaded guns, and those who dig.
You dig.
Home Blog About Contact
News

AutoRun

Download AutoRun.zip (171.77 KB)

AutoRun (gee, what an original name) is very simple and basic application to create autorun menu for CD's or DVD's. You can change image, icon, caption, number and function of buttons and their appearance. All changes are done by modifying the ini file and are very easy to understand.

For autoplay to work on your CD/DVD, you must also include file autorun.inf. Basic autorun.inf is included with this package, open it in Notepad to edit or view it. You can get more information about autorun.inf from here.

That said, I heavily recommend disabling CD/DVD autorun on your system. This is the worst feature ever, security-wise (remember Sony rootkits?!). Any inserted disc can start whatever its creators want to... security nightmare. See this page for help on disabling autoplay/autorun feature or use TweakUI (freeware from Microsoft, download from here) to do that.

AutoRun example with flat buttons
Flat buttons
Regular buttons
Regular buttons

INI settings

Autorun.ini has two sections - [main] and [buttons]. Main holds information about how application appears, buttons, unsurprisingly, defines what buttons your autorun has and what they will do. You can see uncommented example ini contents at the bottom of this page.

All ini commands are in bold , comments look like this.

Section [main]

Note: You can skip the main section altogether, in that case default values are used.

caption=AutoRun
defines the caption of the autorun window. For example, it could be: caption=Vacation photos, June 2006

icon=AutoRun.ico
Icon that is used for main window and application.

image=AutoRun.bmp
Image on the left. It must be .bmp, but image dimensions are not limited.

imageurl=http://dukelupus.net
URL that opens when user clicks on the image. Can also be filename on disc or such.

url=http://example.com
URL in bottom left corner

flatbuttons=0
values are 0/1. Flat buttons look more stylish, but aren't as easy to see. Play with that setting.

ButtonsInColumn=10
If the number of buttons is bigger then this value, then buttons will be split into as many columns as necessary. Note that "space=" elements do not count as buttons.


Top=200
Left=300
Top and left values determine the location of the AutoRun window, starting from the top left corner. If you omit these, the window will be placed to the center of the desktop. Do remember that screens have different resolutions, so placing it to bottom right corner is not a good idea.

Section [buttons]

Buttons will be shown in same order as they appear in ini. You can have as little or as many buttons as you want to, window will adjust its size to accommodate them. Buttons will also resize themselves if you use very long captions. Format is "button caption=function". "Function" can be internet link, path to file on CD/DVD (remember to skip disc letter, ie "my applications\myapp.exe", not "d:\my applications\myapp.exe"), file to open in HDD ("Notepad=notepad.exe") etc. If you link non-executable file (such as .avi, .doc or .txt), then it will be opened with the associated program.

You can create Alt+character shortcuts by prefixing character in name with "&" - for example, E&xit - alt+x will be same as clicking on Exit button. If you need to have & in button caption, use "&&" - ie, to get "Night & Day", use "Night && Day". You cannot have = (equals) character in the name. Browse and Exit are pre-defined values and can be used with any buttons. For example: &Browse contents of this DVD=Browse

As of version 1.1, there is a special key in the buttons section - "space=number". This allows you to have a blank space between the buttons. Number is the height of that space in pixels. You can have as many space keys as you want, but do notice that they do not count as buttons if you set "ButtonsInColumn" value in main section.

These are all just sample buttons:

&Open .ini=AutoRun.ini
Notepad=notepad.exe
c:\=c:\
&Browse=Browse
Home page=http://example.com
space=10
E&xit=Exit

 

Uncommented Autorun.ini example

[main]
caption=AutoRun
image=AutoRun.bmp
icon=AutoRun.ico
imageurl=http://dukelupus.net
top=200
left=300
ButtonsInColumn=10
url=http://example.com
flatbuttons=0

[buttons]
&Open .ini=AutoRun.ini
Notepad=notepad.exe
c:\=c:\
&Browse=Browse
Home page=http://example.com
space=20
E&xit=Exit

Version info

  • 2006-09-15 v1.0 Initial release
  • 2006-10-21 v1.1 Implemented Top, Left, space, ButtonsInColumn as suggested by Larry.
  • 2017-08-04 v1.11 Fixed default URL's (thank you, Todd!)
'

Valid HTML 4.01 Transitional Valid CSS!