INF file format Summary

Source: Internet
Author: User
Tags old windows
INF is the abbreviation of device information file, which is released by Microsoft for hardware device manufacturers. Program A file format released. The inf file contains hardware device information or scripts to control hardware operations. INFI Functions 1. Copy, delete, or rename a file.
2. add or delete a project in the registry.
3. Modify important system settings files (such as autoexec. bat, config. sys, And. INI) INF rules INF is a plain text file, which is segmented. This is similar to the INI file. Each section is expanded, each node name can contain a maximum of 255 characters (in Windows 2000/XP/2003 operating systems) or 28 characters (in Windows 98 operating systems ). The content between a section is called an entry. Each section is composed of multiple entries. Each entry is separated by a, for example, a = "B ". If there are multiple values after an equal sign for each entry, separate each value with a comma. INF is not case sensitive. The line comment statement command is ";", similar to 'in VB '. If a row cannot be written, use "\" to wrap the line. INF running . The inf file is a script file interpreted and executed by the setupapi of windows. It runs in a simple and linear way. there is no branch statement in the running process of the INF file, that is, there is no conditional statement. Once executed, it is run along a fixed route. It runs in units of nodes. It starts from a [install] section and runs entries in this section from top to bottom. If this entry is a section, execute the entries in the subsection one by one, so that they are recursively executed. To run the program on the window, right-click the file and click Install. INF syntax structure ; Specify version and signature Section
[Version]
The system checks whether the current version is applicable according to signuure. If it is applicable, the system executes the command. Otherwise, the command is not executed. Of course, the Force installation is acceptable.
; For Win9x
Signature = "$ Chicago $"
; Winnt +
; Signature = "$ Windows NT $"; specifies the Installation File Layout
This row is optional. If no layout information file is provided, the INF file must contain sections [sourcedisksnames] and [sourcedisksfiles ].
Layoutfile = filename. inf [sourcedisksnames] Section
The [sourcedisksnames] section lists the drive letter sequence code, disk descriptor, disk volume number, and disk serial number of the source file.
The syntax of the statements in [sourcedisksnames] is:
Disk-ordinal = "disk-description", disk-label, disk-serial-Number
Here, disk-ordinal is a required sequence code, which identifies a source disk and has uniqueness. It can be set to an integer that increases from 1, 0 is not a valid drive letter sequence code. When multiple source disks exist, the serial number of the drive letter cannot be repeated.
Disk-description is a required disk descriptor. It is a string or string macro enclosed in double quotation marks to describe the content or purpose of the disk. The installation engine displays the string in the dialog box to prompt the user.
Disk-label is the volume ID of the source disk.
Disk-serial-number is not used, but must be set to 0.
[Sourcedisksfiles]
[Sourcedisksfiles] specifies the source file, drive letter sequence, and disk descriptor used during installation. The statement syntax in [sourcedisksfiles] is:
File-name = disk-number [, subdir] [, file-size]
The file-name parameter is required and is the name of the file on the source disk.
Disk-number is the drive letter sequence code that contains the source disk of the file-name specified file. The drive letter sequence code must be listed in [sourcedisksnames] and must be greater than or equal to 1.
Subdir is optional. It specifies the subdirectory of the source disk where the file is located. If it is omitted, the source disk is the default installation path.
File-size is optional, indicating the file size, in bytes. [Destinationdirs]
; Specifies the default operation directory for copyfiles, renfiles, or delfiles entries
; Syntax file-list-Section = ldid, [subdir]
The ldid list is as follows:
; 01; Current Directory
; 04; Backup Directory
; 10; Windows Directory
; 11; System dir
; 12; iosubsys
; 13; command
; 14; Control Panel directory
; 15; printers directory
; 16; workgrou dir
; 17; INF dir
; 18; help dir
; 19; administration dir
; 20; Fonts
; 21; viewers
; 22; vmm32
; 23; color dir
; 25; shared dir
; 26; winboot
; 28; host winboot
; 30; root of boot drive
; 31; root of host drive of a virtual boot drive
; 32; Old windows dir if exists; the following example is installed in the Windows \ WEB directory.
; Defaultdestdir = 10, "Web" [Install]
Provides an overview of the INF file installation process. It identifies other detailed actions in the file that contain the installation information section. It is the real entry for the Windows Installation function to identify the installation process and content [install]; [install] sections are divided into two types: [defaultinstall] and [otherinstall ].
; [Defainstall install] The section name defaultinstall is explicitly specified in the Registry as described in the preceding table.
This section is also the first entry for the system to obtain the installation information in the INF file. When you right-click the INF file and select "Install", this section is executed.
; The [otherinstall] and [defainstall install] sections follow the same syntax, but must be explicitly called and are often used to define anti-installation actions. The default installation Section
[Defainstall install] ; Indicates the subsection for adding the registry. The custom node name is followed by the equal sign. For example, see [add ].
Addreg = add; specifies the Registry subsection to be deleted. The custom node name is after the equal sign.
Delreg = del; specifies the file subsection to be copied for installation. The copyfiles command can replace the file being accessed by the system. These functions cannot be implemented through normal del and copy commands.
Copyfiles = cfile; specifies the file subsection to be deleted for reverse installation. Multiple sections are separated by commas. If you find that the file to be deleted is locked, the file will be placed in the system deletion queue and queued
When the system restarts, the file is automatically deleted.
Delfiles = delete a file segment
; [Delete a file segment]
; File Name List
; Example:
;A.exe
; B. sys; rename the file segment
Renfiles = rename a file segment ; [Rename a file segment]
; Syntax:
; [File-list-section]
; New-file-name, old-file-name
; File1, file2; change the file name file1 to file2; update the INI file segment content subsection
Updateinis = Update INI file segment ; [Update INI file segment]
; Ini-file, ini-section, [old-ini-entry], [New-ini-entry], [flags]
Ini-file contains the. ini file name of the entry to be modified.
The ini-section contains the name of the node for which you want to change the entry.
; (Optional) old-ini-entry. The common format is key = value.
; New-ini-entry (optional)
; Key = value. Flags is an optional operation tag.
; % 01% \ wincmd. ini, configuration, "installdir = % 01%"
; % 01% \ wincmd. ini, configuration, "mainmenu = % 01% \ language \ tcextmenu. MNU" ; Update INI file value content
Updateinifield = ; INI file updates the Registry
Ini2reg = AA. ini ; Update config. sys content
Updatecfgsys = Update autoexec. Bat segment [update autoexec. Bat segment]; update autoexec. Bat content
Updateautobat = update the autoexec. Bat segment
[Update autoexec. Bat segment]; Define the resource section, such as the resource file. When calling % REG_SZ %, it indicates 0x00000000.
[Strings]
REG_SZ = 0x00000000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001 ; Customize the Section for adding registry entries
[Add]; Note format: hkey (Root Key abbreviation), subkey (subkey), valuename (key value name), type (key value type), value (key value)
; Hkcu-> HKEY_CURRENT_USER
; Hkcr-> hkey_classes_root
; HKLM-> HKEY_LOCAL_MACHINE
; HKU-> HKEY_USERS
; HKU-> HKEY_USERS
; HKCC-> hkey_current_config
; Hkdd-> hkey_dyn_data; Disable Registry Editor
Hkcu, Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System, disableregistrytools, 1, 0
; Disable Internet Options of IE
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ restrictions, nobrowseroptions, 1, 0
; Specific options in Internet Options of IE
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ restrictions, nobrowseroptions, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, settings, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, homepage, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, generaltab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, cache, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, history, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, colors, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, fonts, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, ages, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, accessibility, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, securitytab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, secchangesettings, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, secaddsites, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, contenttab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, ratings, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, certificates, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, certifpers, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, certifsite, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, certifpub
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, formsuggest, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, formsuggest passwords, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, wallet, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, profiles, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, connectionstab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, connection wizard, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, connwiz admin lock, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, connection settings, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, proxy, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, AutoConfig, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, programstab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, resetwebsettings, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, check_if_default, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, advancedtab, 1, 0
Hkcu, SOFTWARE \ Policies \ Microsoft \ Internet Explorer \ Control Panel, advanced, 1, 0
; Unban download (available for separate use)
Hkcu, Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings \ Zones \ 3, 1803, 1, 0
Automatically modify ie title bar text, home page, search page, etc.
Hkcu, Software \ Microsoft \ Internet Explorer \ main, window title, 0, "Internet Explorer"
Hkcu, Software \ Microsoft \ Internet Explorer \ main, start page, 0, "http://www.20cn.net"
Hkcu, Software \ Microsoft \ Internet Explorer \ main, search page, 0, "http://www.20cn.net"
Hkcu, Software \ Microsoft \ Internet Explorer \ main, default_page_url, 0, "http://www.20cn.net"
HKLM, Software \ Microsoft \ Internet Explorer \ main, default_search_url, 0, "http://www.20cn.net"
HKLM, Software \ Microsoft \ Internet Explorer \ main, search page, 0, "http://www.20cn.net"
HKLM, Software \ Microsoft \ Internet Explorer \ main, start page, 0, "http://www.20cn.net"
HKLM, Software \ Microsoft \ Internet Explorer \ main, default_page_url, 0, "http://www.20cn.net"
HKLM, Software \ Microsoft \ Internet Explorer \ main, default_page_url, 0, "http://www.20cn.net" [dfile]
This section defines the list of files to be deleted. The 1 mark after filename indicates that if the file cannot be deleted currently, it will be deleted after the system restarts.
; Format: filename, 1
; Example:
A.exe, 1 Reference:
Http://article.pchome.net/2005/01/20/34740.htm
Http://tech.sina.com.cn/s/s/2005-01-04/1026493614.shtml
Http://www.20cn.net/ns/wz/sys/data/20040325034138.htm
Http://www.moon-soft.com/program/FORMAT/binary/inf.htm
Http://www.onegreen.net/Article_Show.asp? ArticleID = 47
Http://www2.ccw.com.cn/02/0212/c/0212c05_1.asp
Http://www.driverdevelop.com/forum/viewthread.php? Tid = 62975
Http://www.microsoft.com/resources/documentation/windows/98/all/reskit/en-us/part7/wrkappc.mspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.