schede

13 novembre 2007

AutoRun

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.


INI settings
Autorun.ini has two sections - [main] and [buttons]. Main
holds information about how application appears, buttons unsurprisingly define
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=AutoRundefines the caption of the autorun window. For
    example, it could be:
  • caption=Vacation photos, June 2006
  • icon=AutoRun.icoIcon that is used for main window and application.
  • image=AutoRun.bmpImage on the left. It must be .bmp, but image dimensions
    are not limited.
  • imageurl=http://dukelupus.pri.eeURL that opens when user clicks on the
    image. Can also be filename on disc or such.
  • url=http://example.comURL in bottom left corner
  • flatbuttons=0values are 0/1. Flat buttons look more stylish, but aren't as
    easy to see. Play with that setting.
  • ButtonsInColumn=10If 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=200Left=300Top 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