I didn't find it after searching here~ Transferred over~
The INF file is full name Information File, which is a file used to describe data information such as devices or files under the Windows operating system. The INF file is composed of standard ASCII codes, and you can use any text editor to view and modify its content. Generally, we always think that the INF file is the driver program of the system device, but this is a wrong understanding. The reason why Windows prompts that an INF file is needed when installing the driver of some hardware is that the INF file provides a comprehensive description of the hardware parameters and the corresponding driver file (DLL file) information. It is just like we install computer hardware by looking at the manual. We are the Windows system, and the manual is the INF file. The INF file is very powerful and can almost complete all the functions of daily operations. You can think of it as an extremely powerful batch processing under the Windows system. To master and understand even write INF files, you need to have a considerable understanding of its internal structure. Now let's go deep into the INF file to take a look at its true face!
The composition of the INF file has three parts: sections, keys, and values.
The key sections are
version description information, mainly used for version control.
string information, used for constant definition.
define system path information.
indicate the source disk information.
indicate the source disk file name.
starts to perform installation.
Other sections can be customized. Let's use an example to specifically explain.
Program code
Signature=$Chicago$
Provider=%Author%
Product="Add file association demonstration"
Version="1.0"
Author="Xunchi"
Copyright="Copyright 2005"
CustomFile="inf" ;Modify the file name suffix you need
Program="NOTEPAD.EXE" ;Modify the application name you need to associate
HKCR,"."%CustomFile%,"",FLG_ADDREG_TYPE_SZ ,%CustomFile%File
HKCR,%CustomFile%File,"",FLG_ADDREG_TYPE_SZ,Installation information
HKCR,%CustomFile%"File\shell","",FLG_ADDREG_TYPE_SZ,open
HKCR,%CustomFile%"File\shell\open\command","",FLG_ADDREG_TYPE_SZ,%program% %1
AddReg=Add.Reg
In the section, the "Signature" item defines in which operating system version this INF file needs to run. There are three values: $Windows NT$, $Chicago$, or $Windows 95$ for selection. Generally, $Chicago$ is selected. In the item Provider, the author of this file is defined, and %Author% refers to the value of the Author item. You can also customize other items to describe the version information of this INF file. The function of this INF file is to associate files, so it is mainly the operation of the registry. Let's look at the section, there are four statements, all in the same format. HKCR represents the root HKEY_CLASSES_ROOT, the second parameter is the path name of the subkey, the third parameter indicates the type of the value, and finally the value (specifically see the appendix). The above are all the definitions and processes of the operation. In the section , it is the process of starting to perform the installation to be installed. AddReg indicates that it is the operation on the registry, and the operation object is the definition in the Add.Reg section. If you replace AddReg with DelReg, it is to delete the key value in the registry. When you click the INF file with the mouse and select "Install" in the pop-up menu, the operation you defined starts to be executed. This example adds the view editing function in the right-click menu of the system's INF file and sets the default action. Because installing an unknown INF file may have a bad impact on the system, double-clicking the file can open and edit this file.
Let's take a look at the capabilities of the INF file in file operations. Please see the following example.
Program code
Signature=$Chicago$
Provider=%Author%
Product="File copy and installation demonstration"
Version="1.0"
Author="Xunchi"
Copyright="Copyright 2005"
ProcessList.exe ;This file is already in the current directory, the same below.
Wordpad.exe
FileList=11 ;Install to the system directory of Windows
FileList1=10 ;Install to the Windows directory
Copyfiles=FileList,FileList1
The role of the same section is similar to the previous example. Please pay attention to the newly appeared section , which is the section name I customized, which represents a file group, and is similar. In the section , the directory to which each file group is copied needs to be defined (the meanings of each constant are in the appendix). Copyfiles specifies the file groups that need to be copied.
The operations of the INF file also include the installation and uninstallation of service (NT system) programs, the conversion of INI files, etc. Since these operations are relatively complex and cumbersome, and there is a certain risk, we will discuss them in depth next time when there is a chance.
Finally, let's take a look at the execution mechanism of the INF file. At this time, you may ask, isn't it just simply executing "Install"? If you don't know why, your knowledge level will not improve. Find the "Install" command of the INF file in "Folder Options" -> "File Types" and see a string of commands. "rundll32.exe setupapi,InstallHinfSection DefaultInst_all 132 %1" It means running the command InstallHinfSection in the Dll file setupapi.dll and passing the name of the starting section DefaultInstall to it. It can be seen that the starting section can be customized. The execution of the INF file can also be used in various programming tools that support API calls. So far, we have basically understood the structure and operation mechanism of the INF file. Now let your thinking start to work and let it work better for you.
Constant definitions for registry operations:
----------------------------------------------------------
Constant Root value
HKCR HKEY_CLASSES_ROOT.
HKCU HKEY_CURRENT_USER.
HKLM HKEY_LOCAL_MACHINE.
HKU HKEY_USERS.
-----------------------------------------------------------
FLG_ADDREG_APPEND Append characters after multi-strings
FLG_ADDREG_TYPE_SZ Character type
FLG_ADDREG_TYPE_MULTI_SZ String type
FLG_ADDREG_TYPE_EXPAND_SZ Expand string type
FLG_ADDREG_TYPE_BINARY Binary value
FLG_ADDREG_TYPE_DWORD DWord value
FLG_ADDREG_TYPE_NONE NULL value
----------------------------------------------------------
Constants for the section
----------------------------------------------------------
01 Source directory (followed by path)
10 Windows directory
11 Windows system directory
12 Driver directory
17 INF file directory
18 Help file directory
20 Font directory
21 Root directory
24 Application directory
25 Shared directory
30 Current root directory
50 System directory
51 Spool directory
52 Spool driver directory
53 User configuration directory
----------------------------------------------------------
Operations defined in the section
----------------------------------------------------------
LogConfig Log file configuration
Copyfiles Copy files
Renfiles Rename files
Delfiles Delete files
UpdateInis Update Inis
UpdateIniFields Update Ini fields
AddReg Add registry items
DelReg Delete registry items
Ini2Reg Convert Ini file to Reg file
----------------------------------------------------------
Functions of INF
1 Copy files, delete files, or rename files.
2 Add or delete items in the registry.
3 Modify important system setting files (such as Autoexec.bat, Config.sys, .INI, etc.)
Rules of INF
INF is a plain text file, which is sectional, similar to the INI file. Each section is enclosed by "". The longest length of each section name is 255 characters (in Windows 2000/XP/2003 operating systems) or 28 characters (in Windows 98 operating system). The content between sections is called entries. Each section is composed of many entries. Each entry is separated by =, such as a="b". If there are multiple values after the equal sign of each entry, each value is separated by ",". INF is not case-sensitive. The line comment statement command is ";", similar to ’ in VB. If a line cannot be written down, use "\" to wrap the line.
Running of INF
The .INF file is a script file executed by the Windows SetupAPI. Its running process is very simple, which is a linear execution. The meaning of linear is that there are no branch statements in the running process of the .INF file, that is, no conditional statements. Once execution starts, it runs along a fixed route. Its running is executed in units of sections. It starts from a certain section and executes the entries in this section from top to bottom. If this entry is a section, it executes the entries in the sub-section one by one, and so on recursively. To run on WINDOW, just right-click this file and click Install.
Syntax structure of INF
; Specify the version and signature section
; The system checks whether it is suitable for the current version according to Signuture. If it is suitable, it will execute; otherwise, it will not execute. Of course, forced installation is possible
; For WIN9X
Signature="$CHICAGO$"
; WINNT+
; Signature="$Windows NT$"
; Specify the installation file layout. This line is optional. If the layout information file is not provided, the and sections must be included in the INF file
LayoutFile=filename.inf
section
The section lists the disk sequence code, disk descriptor, disk volume label, and disk serial number where the source file is located.
The syntax of the statements in the section is:
disk-ordinal=“disk-description”,disk-label,disk-serial-number
Among them, disk-ordinal is a required option, which is the disk sequence code, identifies a source disk, and is unique. Generally, it can be set to an integer incremented from 1. 0 is not a valid disk sequence code. When there are multiple source disks, the disk sequence codes cannot be repeated.
disk-description is a required option, which is the disk descriptor, a string or string macro enclosed in double quotes to describe the content or purpose of the disk. The installation engine displays this string in the dialog box to prompt the user.
disk-label is the volume identifier of the source disk.
disk-serial-number is not used, but must be set to 0.
section
The section specifies the source file used during installation and the disk sequence code and disk descriptor. The syntax of the statements in the section is:
file-name=disk-number
Among them, file-name is a required option, which is the name of the file on the source disk.
disk-number is the disk sequence code of the source disk where the file specified by file-name is located. This disk sequence code needs to be listed in the section and is greater than or equal to 1.
Subdir is an optional option, specifying the subdirectory of the source disk where the file is located. If omitted, the source disk is the default installation path.
file-size is an optional option, indicating the size of the file in bytes.
; Specify the default operation directory for the CopyFiles, RenFiles or DelFiles entry
; Syntax file-list-section=LDID,
; 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 to install to the window\web directory
; DefaultDestDir=10,"web"
; The section provides an overview of the installation process of an INF file. It identifies the detailed actions of other sections in the file that contain installation information. It is the real entry for the built-in installation function in Windows to identify the installation process and content
; The section is divided into two types: and
; The section name DefaultInstall of the section is explicitly specified in the registry as described in the previous table.
; This section is also the primary entry for the system to obtain the installation information in the INF file. When the user right-clicks the INF file and selects "Install", the content of this section is executed.
; follows the same syntax as the section, but must be explicitly called, and is often used to define the uninstall action
; Default installation section
; Specify the sub-section to add the registry. The custom section name after the equal sign, see the section for an example
ADDREG=add
; Specify the sub-section to delete the registry. The custom section name after the equal sign
DELREG=del
; Specify the file sub-section to be copied, used for installation. The Copyfiles command can replace the file that the system is accessing. These functions cannot be achieved through ordinary del and copy commands
CopyFiles=cfile
; Specify the file sub-section to be deleted, used for uninstallation. Multiple sections are separated by commas. If the command finds that the file to be deleted is locked, it will put the file in the system deletion queue and wait.
; When the system restarts, this file will be automatically deleted
DelFiles=Delete file segment
;
; File name list
; Example:
;a.exe
;b.sys
;Rename file segment
;RenFiles=Rename file segment
;
; Syntax:
;
; new-file-name,old-file-name
; file1,file2 ;Rename file file1 to file2
; Update INI file segment content sub-section
UpdateInis = Update INI file segment
;
; ini-file, ini-section, , ,
; ini-file .ini file name containing the entry to be changed
; ini-section section name containing the entry to be changed
; old-ini-entry optional, commonly used form is Key=Value
; new-ini-entry optional, commonly used form is
; Key=Value. flags is an optional operation flag
; Example
;%01%\wincmd.ini, Configuration,,"InstallDir=%01%"
;%01%\wincmd.ini, Configuration,,"Mainmenu=%01%\LANGUAGE\TCExtMenu.mnu"
; Update ini file value content
updateinifield =
; Ini file updates registry
ini2reg=aa.ini
; Update config.sys content
updatecfgsys=Update autoexec.bat segment
; Update autoexec.bat content
updateautobat=Update autoexec.bat segment
; Define resource section, like resource files. When called, %REG_SZ% represents 0x00000000
REG_SZ=0x00000000
REG_BINARY=0x00000001
REG_DWORD=0x00010001
; Custom section to add registry items
; Note the 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
; Unlock registry editor
HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableRegistryTools,1,0
; Unlock Internet options of IE
HKCU,Software\Policies\Microsoft\Internet Explorer\Restrictions,NoBrowserOptions,1,0
; Unlock various 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,Languages,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,1,0
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
; Unlock download (can be used alone)
HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1803,1,0
; Automatically modify IE title bar text, homepage, 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.zmn120.net
HKCU,Software\Microsoft\Internet Explorer\Main,Search Page,0,"http://www.zmn120.net
HKCU,Software\Microsoft\Internet Explorer\Main,Default_Page_URL,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Search_URL,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Search Page,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Start Page,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Page_URL,0,http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Page_URL,0,http://www.zmn120.net
; This section defines the list of files to be deleted. 1 after filename is a flag, indicating that if the file cannot be deleted currently, it will be deleted after the system restarts.
; Format: filename,,,1
; Example:
a.exe,,,
The INF file is full name Information File, which is a file used to describe data information such as devices or files under the Windows operating system. The INF file is composed of standard ASCII codes, and you can use any text editor to view and modify its content. Generally, we always think that the INF file is the driver program of the system device, but this is a wrong understanding. The reason why Windows prompts that an INF file is needed when installing the driver of some hardware is that the INF file provides a comprehensive description of the hardware parameters and the corresponding driver file (DLL file) information. It is just like we install computer hardware by looking at the manual. We are the Windows system, and the manual is the INF file. The INF file is very powerful and can almost complete all the functions of daily operations. You can think of it as an extremely powerful batch processing under the Windows system. To master and understand even write INF files, you need to have a considerable understanding of its internal structure. Now let's go deep into the INF file to take a look at its true face!
The composition of the INF file has three parts: sections, keys, and values.
The key sections are
version description information, mainly used for version control.
string information, used for constant definition.
define system path information.
indicate the source disk information.
indicate the source disk file name.
starts to perform installation.
Other sections can be customized. Let's use an example to specifically explain.
Program code
Signature=$Chicago$
Provider=%Author%
Product="Add file association demonstration"
Version="1.0"
Author="Xunchi"
Copyright="Copyright 2005"
CustomFile="inf" ;Modify the file name suffix you need
Program="NOTEPAD.EXE" ;Modify the application name you need to associate
HKCR,"."%CustomFile%,"",FLG_ADDREG_TYPE_SZ ,%CustomFile%File
HKCR,%CustomFile%File,"",FLG_ADDREG_TYPE_SZ,Installation information
HKCR,%CustomFile%"File\shell","",FLG_ADDREG_TYPE_SZ,open
HKCR,%CustomFile%"File\shell\open\command","",FLG_ADDREG_TYPE_SZ,%program% %1
AddReg=Add.Reg
In the section, the "Signature" item defines in which operating system version this INF file needs to run. There are three values: $Windows NT$, $Chicago$, or $Windows 95$ for selection. Generally, $Chicago$ is selected. In the item Provider, the author of this file is defined, and %Author% refers to the value of the Author item. You can also customize other items to describe the version information of this INF file. The function of this INF file is to associate files, so it is mainly the operation of the registry. Let's look at the section, there are four statements, all in the same format. HKCR represents the root HKEY_CLASSES_ROOT, the second parameter is the path name of the subkey, the third parameter indicates the type of the value, and finally the value (specifically see the appendix). The above are all the definitions and processes of the operation. In the section , it is the process of starting to perform the installation to be installed. AddReg indicates that it is the operation on the registry, and the operation object is the definition in the Add.Reg section. If you replace AddReg with DelReg, it is to delete the key value in the registry. When you click the INF file with the mouse and select "Install" in the pop-up menu, the operation you defined starts to be executed. This example adds the view editing function in the right-click menu of the system's INF file and sets the default action. Because installing an unknown INF file may have a bad impact on the system, double-clicking the file can open and edit this file.
Let's take a look at the capabilities of the INF file in file operations. Please see the following example.
Program code
Signature=$Chicago$
Provider=%Author%
Product="File copy and installation demonstration"
Version="1.0"
Author="Xunchi"
Copyright="Copyright 2005"
ProcessList.exe ;This file is already in the current directory, the same below.
Wordpad.exe
FileList=11 ;Install to the system directory of Windows
FileList1=10 ;Install to the Windows directory
Copyfiles=FileList,FileList1
The role of the same section is similar to the previous example. Please pay attention to the newly appeared section , which is the section name I customized, which represents a file group, and is similar. In the section , the directory to which each file group is copied needs to be defined (the meanings of each constant are in the appendix). Copyfiles specifies the file groups that need to be copied.
The operations of the INF file also include the installation and uninstallation of service (NT system) programs, the conversion of INI files, etc. Since these operations are relatively complex and cumbersome, and there is a certain risk, we will discuss them in depth next time when there is a chance.
Finally, let's take a look at the execution mechanism of the INF file. At this time, you may ask, isn't it just simply executing "Install"? If you don't know why, your knowledge level will not improve. Find the "Install" command of the INF file in "Folder Options" -> "File Types" and see a string of commands. "rundll32.exe setupapi,InstallHinfSection DefaultInst_all 132 %1" It means running the command InstallHinfSection in the Dll file setupapi.dll and passing the name of the starting section DefaultInstall to it. It can be seen that the starting section can be customized. The execution of the INF file can also be used in various programming tools that support API calls. So far, we have basically understood the structure and operation mechanism of the INF file. Now let your thinking start to work and let it work better for you.
Constant definitions for registry operations:
----------------------------------------------------------
Constant Root value
HKCR HKEY_CLASSES_ROOT.
HKCU HKEY_CURRENT_USER.
HKLM HKEY_LOCAL_MACHINE.
HKU HKEY_USERS.
-----------------------------------------------------------
FLG_ADDREG_APPEND Append characters after multi-strings
FLG_ADDREG_TYPE_SZ Character type
FLG_ADDREG_TYPE_MULTI_SZ String type
FLG_ADDREG_TYPE_EXPAND_SZ Expand string type
FLG_ADDREG_TYPE_BINARY Binary value
FLG_ADDREG_TYPE_DWORD DWord value
FLG_ADDREG_TYPE_NONE NULL value
----------------------------------------------------------
Constants for the section
----------------------------------------------------------
01 Source directory (followed by path)
10 Windows directory
11 Windows system directory
12 Driver directory
17 INF file directory
18 Help file directory
20 Font directory
21 Root directory
24 Application directory
25 Shared directory
30 Current root directory
50 System directory
51 Spool directory
52 Spool driver directory
53 User configuration directory
----------------------------------------------------------
Operations defined in the section
----------------------------------------------------------
LogConfig Log file configuration
Copyfiles Copy files
Renfiles Rename files
Delfiles Delete files
UpdateInis Update Inis
UpdateIniFields Update Ini fields
AddReg Add registry items
DelReg Delete registry items
Ini2Reg Convert Ini file to Reg file
----------------------------------------------------------
Functions of INF
1 Copy files, delete files, or rename files.
2 Add or delete items in the registry.
3 Modify important system setting files (such as Autoexec.bat, Config.sys, .INI, etc.)
Rules of INF
INF is a plain text file, which is sectional, similar to the INI file. Each section is enclosed by "". The longest length of each section name is 255 characters (in Windows 2000/XP/2003 operating systems) or 28 characters (in Windows 98 operating system). The content between sections is called entries. Each section is composed of many entries. Each entry is separated by =, such as a="b". If there are multiple values after the equal sign of each entry, each value is separated by ",". INF is not case-sensitive. The line comment statement command is ";", similar to ’ in VB. If a line cannot be written down, use "\" to wrap the line.
Running of INF
The .INF file is a script file executed by the Windows SetupAPI. Its running process is very simple, which is a linear execution. The meaning of linear is that there are no branch statements in the running process of the .INF file, that is, no conditional statements. Once execution starts, it runs along a fixed route. Its running is executed in units of sections. It starts from a certain section and executes the entries in this section from top to bottom. If this entry is a section, it executes the entries in the sub-section one by one, and so on recursively. To run on WINDOW, just right-click this file and click Install.
Syntax structure of INF
; Specify the version and signature section
; The system checks whether it is suitable for the current version according to Signuture. If it is suitable, it will execute; otherwise, it will not execute. Of course, forced installation is possible
; For WIN9X
Signature="$CHICAGO$"
; WINNT+
; Signature="$Windows NT$"
; Specify the installation file layout. This line is optional. If the layout information file is not provided, the and sections must be included in the INF file
LayoutFile=filename.inf
section
The section lists the disk sequence code, disk descriptor, disk volume label, and disk serial number where the source file is located.
The syntax of the statements in the section is:
disk-ordinal=“disk-description”,disk-label,disk-serial-number
Among them, disk-ordinal is a required option, which is the disk sequence code, identifies a source disk, and is unique. Generally, it can be set to an integer incremented from 1. 0 is not a valid disk sequence code. When there are multiple source disks, the disk sequence codes cannot be repeated.
disk-description is a required option, which is the disk descriptor, a string or string macro enclosed in double quotes to describe the content or purpose of the disk. The installation engine displays this string in the dialog box to prompt the user.
disk-label is the volume identifier of the source disk.
disk-serial-number is not used, but must be set to 0.
section
The section specifies the source file used during installation and the disk sequence code and disk descriptor. The syntax of the statements in the section is:
file-name=disk-number
Among them, file-name is a required option, which is the name of the file on the source disk.
disk-number is the disk sequence code of the source disk where the file specified by file-name is located. This disk sequence code needs to be listed in the section and is greater than or equal to 1.
Subdir is an optional option, specifying the subdirectory of the source disk where the file is located. If omitted, the source disk is the default installation path.
file-size is an optional option, indicating the size of the file in bytes.
; Specify the default operation directory for the CopyFiles, RenFiles or DelFiles entry
; Syntax file-list-section=LDID,
; 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 to install to the window\web directory
; DefaultDestDir=10,"web"
; The section provides an overview of the installation process of an INF file. It identifies the detailed actions of other sections in the file that contain installation information. It is the real entry for the built-in installation function in Windows to identify the installation process and content
; The section is divided into two types: and
; The section name DefaultInstall of the section is explicitly specified in the registry as described in the previous table.
; This section is also the primary entry for the system to obtain the installation information in the INF file. When the user right-clicks the INF file and selects "Install", the content of this section is executed.
; follows the same syntax as the section, but must be explicitly called, and is often used to define the uninstall action
; Default installation section
; Specify the sub-section to add the registry. The custom section name after the equal sign, see the section for an example
ADDREG=add
; Specify the sub-section to delete the registry. The custom section name after the equal sign
DELREG=del
; Specify the file sub-section to be copied, used for installation. The Copyfiles command can replace the file that the system is accessing. These functions cannot be achieved through ordinary del and copy commands
CopyFiles=cfile
; Specify the file sub-section to be deleted, used for uninstallation. Multiple sections are separated by commas. If the command finds that the file to be deleted is locked, it will put the file in the system deletion queue and wait.
; When the system restarts, this file will be automatically deleted
DelFiles=Delete file segment
;
; File name list
; Example:
;a.exe
;b.sys
;Rename file segment
;RenFiles=Rename file segment
;
; Syntax:
;
; new-file-name,old-file-name
; file1,file2 ;Rename file file1 to file2
; Update INI file segment content sub-section
UpdateInis = Update INI file segment
;
; ini-file, ini-section, , ,
; ini-file .ini file name containing the entry to be changed
; ini-section section name containing the entry to be changed
; old-ini-entry optional, commonly used form is Key=Value
; new-ini-entry optional, commonly used form is
; Key=Value. flags is an optional operation flag
; Example
;%01%\wincmd.ini, Configuration,,"InstallDir=%01%"
;%01%\wincmd.ini, Configuration,,"Mainmenu=%01%\LANGUAGE\TCExtMenu.mnu"
; Update ini file value content
updateinifield =
; Ini file updates registry
ini2reg=aa.ini
; Update config.sys content
updatecfgsys=Update autoexec.bat segment
; Update autoexec.bat content
updateautobat=Update autoexec.bat segment
; Define resource section, like resource files. When called, %REG_SZ% represents 0x00000000
REG_SZ=0x00000000
REG_BINARY=0x00000001
REG_DWORD=0x00010001
; Custom section to add registry items
; Note the 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
; Unlock registry editor
HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableRegistryTools,1,0
; Unlock Internet options of IE
HKCU,Software\Policies\Microsoft\Internet Explorer\Restrictions,NoBrowserOptions,1,0
; Unlock various 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,Languages,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,1,0
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
; Unlock download (can be used alone)
HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3,1803,1,0
; Automatically modify IE title bar text, homepage, 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.zmn120.net
HKCU,Software\Microsoft\Internet Explorer\Main,Search Page,0,"http://www.zmn120.net
HKCU,Software\Microsoft\Internet Explorer\Main,Default_Page_URL,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Search_URL,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Search Page,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Start Page,0,"http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Page_URL,0,http://www.zmn120.net
HKLM,SOFTWARE\Microsoft\Internet Explorer\Main,Default_Page_URL,0,http://www.zmn120.net
; This section defines the list of files to be deleted. 1 after filename is a flag, indicating that if the file cannot be deleted currently, it will be deleted after the system restarts.
; Format: filename,,,1
; Example:
a.exe,,,
Recent Ratings for This Post
( 4 in total)
Click for details
纵是千年万年 亦难以忘记
