Autorun

from Wikipedia, the free encyclopedia

Autorun is the function of Windows , data storage to automatically scan and files to automatically open or run as soon as the media for the operating system are available. This allows an installation program to start automatically when a CD or DVD is inserted, for example . The function was initially blocked for files on diskettes and in computer networks .

Microsoft Windows

Windows looks in the root directory of the data store for clear information about its intended use. A well-known file name extension or a configuration file with the name autorun.inf can be used for this . Such a file explicitly specifies how the system should operate. This function should not be confused with the autoplay function, which, regardless of the autorun function, only plays its media files automatically when a CD or DVD is inserted .

Security aspects

The autostart mode carries a high security risk. It can be used to install malicious programs completely unnoticed , because instead of the configuration file described below, executable programs are also processed uncritically by the system, even if they are not available as text files, provided they only have the file name autorun.inf . The user privileges of the system are still higher than the privileges of the administrator. This scenario is not limited to USB sticks and other writable mobile data storage devices that are connected to various computers for data exchange. Even apparently harmless audio CDs have proven to be dangerous in the case of the Sony BMG copy protection scandal.

Autorun can be switched off or restricted in the Windows registry . In addition, autorun can be temporarily prevented by holding the Shift key while connecting to the data memory. However, the standard configuration when installing the operating system allows this function to be carried out.

Autorun.inf

This configuration file is a normal text format in which Windows shell commands are noted by assigning parameters. The necessary structure of an "autorun.inf" file looks like this (example):

1    [AutoRun]
2    open=programm.exe
3    icon=programm.ico
4    action=Programm starten

Line 1 indicates that this is the section of the autorun file to be evaluated, line 2 indicates which program file should be executed and line 3 describes which icon should be used for the otherwise usual drive icon . If no paths are given, the files are expected in the main directory on the same drive. Relative paths can also be used. The option actiongenerates the entry "Start program" in the first line of the AutoPlay selection window.

A name can be assigned to the data carrier with the following line:

   label=Urlaubsbilder

Context menu

In addition, additional context menus (usually appear by clicking the right mouse button) can be defined. The following structure must be used for this:

   shell\Name1=Anzeige
   shell\Name1\command=Pfad\program.exe

Each context menu must have its own unique name. The first line specifies which text is to be displayed in the context menu, the second line contains the program to be started.

shell=Name -n

defines which designation should be the standard activity - which should be started fully automatically or by double-clicking the drive symbol.

shell=The context standard obviously takes precedence over the older open / shellxecute. Both variants can be specified at the same time. In this case, however, the labeling of shell\context standard= and action=and the resulting effect should be the same, so as not to confuse users with different behavior on different systems.

Hotkey

As with other menus in Microsoft Windows, hotkeys can be defined. The required letter is &preceded by a. In the selection display, this letter is then shown underlined and the menu field can be selected by entering this letter on the keyboard and the program can be started immediately.

   shell\view=A&nzeige
   shell\view\command=Pfad\viewer.exe
   shell\info=&Info
   shell\info\command=Pfad\info.exe

ensures that nthe first entry is started when you press and ithe second command is started when you press . Multiple commands with the same HotKey in this context menu should be avoided; the behavior is then unpredictable and undesired program execution could result.

Non-executable files (documents)

Often HTML files should be displayed - but with the standard browser of the current user and not necessarily with open=iexplore.exe index.htm(Microsoft Internet Explorer ). Audio / video files should also be played with the standard player of the PC currently in use; this is not always Windows Media Player - which was called in Windows XP mplay32.exeand should now be wmplayer.exespecified as .

shellexecute=MySlides.ppt [Parameter]
starts the specified PowerPoint presentation without having to know which version of which Office package under which operating system on the computer that will be used later the file extension is pptassigned when the data carrier is created, such as the EXE file is called and in which path it should be sought.

Note: opentakes precedence over shellexecute- so only one should be specified.

The commandin context menu is as well openalways dependent on an executable (EXE, CMD, BAT). There are the following possibilities to achieve this:

Works with all documents, not just those for the browser. The user must already know the file type.
(Slashes "normal" in the path ; file:corresponds to http://and must be placed in front of the path)
shell \ RunDLL = standard browser
shell \ RunDLL \ command = RunDLL32.exe  url.dll, FileProtocolHandler file: README / survey.html
Because something else comes up when you double-click, you can also offer a directory:
shell \ Explorer = Explorer user data
shell \ Explorer \ command = Explorer.exe / e, user data \
Offer the program to open "multimedia.xyz", select if necessary:
shell \ openwith = ShockFlashZoing
shell \ openwith \ command = RunDLL32.exe shell32.dll, OpenAs_RunDLL multimedia.xyz
With the console screen flickering in between, not so nice:
shell \ CMD = command line interpreter
shell \ CMD \ command = cmd.exe  / c start index_ThisDVD.html
Set standard action:
shell = RunDLL

Hard drives

Not only removable media but also hard drives can be equipped with autorun.inf. This would mean that icons would be displayed on the “My Computer”, for example a conspicuous symbol for the system partition C:and others for characterizing data partitions and shared folders in the network.

These also appear when folders are offered to be saved.

Actions (double click and context menu in the workplace) can also be defined; it labelusually wins the upper hand over partition and share names.

Changes take effect when the connection is established or the PC is booted.

With floppy disks , however, autorun.inf will not be able to perform actions "by itself".

In the end, the autorun.inf (like the desktop.ini) are only hints for the operating system. Whether a certain Windows version can follow this or whether these functionalities are deliberately switched off - for security reasons, for example - is decided in each specific case.

Other operating systems

The AutoRun file can be read in plain text by other operating systems (such as Linux or Mac ). In the meantime, the recognition of Microsoft-autorun.inf is often already integrated. At least there are tools that look for an autorun.inf file when a medium is inserted, read its [AutoRun] section and react as required; appropriate scripts can easily be rewritten.

The neutral entries are particularly suitable for this

  • label=
  • icon=
  • shellexecute=

MSWindows icon files have a well-known, simple format that other operating systems can usually display without any problems or temporarily convert appropriately. A single .ICO file is to be used here, not a section from an .EXE or .DLL .

On shellexecutethe appropriate file type would be if known way to open; Document formats such as HTML, TXT, PDF , multimedia, DOC or DOCX are promising here.

To be on the safe side , these files should be located in the main directory of the medium, since a foreign operating system could have difficulties with the path separator \ (it is /expected).

In any case, it is recommended that there is always a README / LIESMICH, index.html or similar in the main directory when the data carrier is passed on to other hands - so that the medium can easily be read “by hand” if problems with auto- Options occur or unknown automatisms are undesirable.

See also

Web links

Individual evidence

  1. a b Deactivating the autorun functionality in Windows . Microsoft. Retrieved August 27, 2010.
  2. autorun.inf functionality in Ubuntu Linux . Ubuntuusers.de. Archived from the original on May 2013. Retrieved June 9, 2013.