Example of the INI File

Source: Internet
Author: User

Myinstall script instructions

Setup.exe is the installation file.
Uninstall.exe is the uninstall file.
Setup.bmp is the logo called by setup.exe. The size is 48 × 48 pixels. If not, use the built-in logo.
Setup. INI is the installation configuration file used by setup.exe.
All the installation modules are stored in sub-directories. Each sub-directory uses the mpcplugin. ini file (you can customize the file name for configuration, and setup.exe will automatically recognize it.
Setup.exe can be installed unattended using the/s,/s,-S, or-S parameters (the running interface is not displayed in uppercase ).

setup. the INI file format is described as follows:
_____________________________________________
[main]
name = Media Player classic boutique edition
readmetricreadme.txt
progdir = # progdir # \ Media Player classic
id = mymcm
exit = 1
brandingtext = silence
ininame = mpcplugin. INI
_____________________________________________
1. [main]
1. Name = Media Player classic boutique edition
This line indicates the installation of the Program name
2. readm E=readme.txt
the content of the readme.txt file is displayed when setup.exe is running. You can use an RTF file, for example,
readme = readme. RTF
3. progdir = # progdir # \ Media Player classic
indicates the default installation path. # progdir # indicates the predefined public variable, which represents X: \ Program Files directory. Other common variables will be discussed later.
4. ID = mymcm
indicates the identifier of the software installed in the installation program. It is the same as the ID in the mpcplugin. ini for future upgrade.
5. Exit = 1
1 indicates that the system automatically exits after installation, and 0 indicates that the system does not exit.
6. Create brandingtext = silence
customize the string displayed on the left end of the horizontal line at the bottom of the setup.exe interface.
7. ininame = myinstall. ini
the name of the component script file. The default value is mpcplugin. ini.

For example:
2. [setup_run]/[uninstall_run]
[Setup_run]
# Sysdir # \ im1_l.exe /? # Sysdir # = afteralwaysnowaitshow
# Sysdir # \ notepad.exe # Sysdir # = beforealwayswaithide
[Uninstall_run]
# Sysdir # \ im1_l.exe /? = Afteralwaysnowaitshow
# Sysdir # \ notepad.exe = beforealwayswaithide
Global installation and uninstallation (the old version of the running function is canceled ). It is used to control the installation and uninstallation of programs before and after running.
The left side of the equal sign is divided into three parts: command line, parameter, and runtime path. The parameter and runtime path can be omitted. Note: If you need to specify the runtime path while omitting the parameter, the delimiter before the parameter cannot be omitted, that is, two consecutive "" must be used. Example:
# Sysdir # \ notepad.exe # Sysdir # = beforealwayswaithide
The right side of the equal sign is divided into four parts, which are separated.
The first part of the available values are before and after, which respectively indicate running before or after installation.
In the second part, the available values are always and normal. Always indicates that the program is run even with Silent Installation.
The third part has available values: wait and Nowait, indicating that the system will return and return immediately after the end of the external program is run.
The fourth part has the available values show and hide, indicating that the interface is displayed or hidden when an external program is running.
3. [language]
1. charset = 134
Indicates the required character set. 134 indicates Simplified Chinese, 136 indicates traditional Chinese, and 0 indicates English.
2. Height =-12
Indicates the font height.-12 is equivalent to 9 characters.
3. font =
Font Name
4. Other parts can be entered in the corresponding language.

The format of the mpcplugin. ini file is described as follows:
_________________________________________
[Main]
Name = vobsub
Title = vobsub subtitle plug-in
Content = vobsub subtitle plug-in
Author = silence
Date = 2003.10.18
Checked = 1
Reg = reg. Reg
Reg98 = 98.reg
Reg2000 = 2000.reg
Unreg = unreg. Reg
Unreg98 = un98.reg
Unreg2000 = un2000.reg
Mutex = xxx, AAA
Id = mympc
PRI = File

Unrar. dll, 0 = # Sysdir #, 0
*. Txt, 0 = # setupdir #, 2
?. EXE, 1 = c :\
[98]
Dvobsub. Ax, 1 = # setupdir # \ codecs, 1
Vobsub. dll, 0 = # setupdir # \ codecs, 0
[2000]
Vsfilter. dll, 1 = # setupdir # \ codecs
[Shortcut]
[Shortcut2000]
Vobsub Programs # setupname #=# Sysdir # \ rundll32.exetest. ico0 "# setupdir # \ codecs \ vsfilter. dll", directvobsub
[Shortcut98]
Vobsub Programs # setupname #=# Sysdir # \ rundll32.exetest. ico0 "# setupdir # \ codecs \ dvobsub. Ax", configure
[Detect]
Rootkey = HKEY_LOCAL_MACHINE
Subkey = SOFTWARE \ Classes \ CLSID \ {0180e49c-13bf-46db-9afd-9f52292e1c22}
Valuename =
Valuedata =
[System. ini]
Driver32, vidc. XviD = XviD. dll
[Dir]
# Setupdir # \ codecs =
[Dir98]
C: \ test =
[Dir2000]
# Progdir # \ test =
[Setup_run]
# Sysdir # \ im1_l.exe /? = Alwaysnowaitshow
# Sysdir # \ notepad.exe = alwayswaithide
[Uninstall_run]
# Sysdir # \ im1_l.exe /? = Afteralwaysnowaitshow
# Sysdir # \ notepad.exe = beforealwayswaithide
_________________________________________
I. [main] Section
0, name = vobsub * is added. To maintain the compatibility of Components in different languages, we recommend that you use it.
The identifier of the component. It is strongly recommended that you use English letters, not case sensitive.
1. Title = vobsub subtitle plug-in
This component is named "vobsub subtitle plug-in ".
2. content = vobsub subtitle plug-in
Part description
3. Author = silence
Package producer
4. Date = 2003.10.18
Production date
5. Checked = 1
0 indicates that this component is not installed by default. 1 indicates that the component is installed by default, and 2 indicates that the component must be installed.
6. Reg = reg. Reg
Indicates the Registry content to be imported during installation. You can use predefined public variables in the reg. reg file, the same below.
Reg98 = 98.reg
Indicates the Registry content to be imported in Win9x.
Reg2000 = 2000.reg
Indicates the Registry content to be imported in the NT/2000/XP system.
7. unreg = unreg. Reg
The Registry Content Used for uninstallation.
Unreg98 = un98.reg
Indicates the Registry content that needs to be deleted when uninstalling Windows 9X.
Unreg2000 = un2000.reg
Indicates the Registry content that needs to be deleted when uninstalling the system on NT/2000/XP.
8. mutex = xxx, AAA * modify Definition
It indicates the components that cannot be installed with this component at the same time. They are separated by commas. Xxx and AAA represent the identifiers in other components, that is, the content on the right side of the line "name = xxx". If this row does not exist, it is replaced by the content on the right of the equal sign of the line "Title = xxx.
9. Run = x: \ XXX \ xxx.exe/d
Indicates the program to run after the installation is complete. The absolute path is used. The parameter/s is invalid during installation.
10. PRI = File
Indicates that the file is copied before the registry project is imported when the component is installed. If this section is not available or the content is empty, import the Registry first and then copy the file.
11. ID = mympc
The identifier of the software installed by this installer, which is the same as the ID in the mpcplugin. ini for future upgrade.
Ii. Section
Demo \ unrar. dll, 0 = # Sysdir #, 0
This section is the file to be copied, unrar. DLL, 0 = # Sysdir # indicates unrar under the current directory. copy the DLL file to the WINDOWS \ SYSTEM (98)/window (winnt) \ system32 directory. # Sysdir # indicates the public variable.
The left side of the equal sign is divided into three parts. The first part indicates the source file, which can include the relative path under the current directory. Wildcards * And? can be used ?. The second part indicates the target file, excluding the path. This part can be omitted (if the first part uses wildcards, the second part must be omitted ). The third step is 1second. This file is registered using regsvr32.exe, and 0 is not required.
The right side of the equal sign is divided into two parts. The first part indicates the target file path and can contain public variables.
The meanings of the second part are as follows: values 0, 1, and 2 (0 by default if this parameter is omitted ):
0 indicates that the source and target files are compared before installation. Only when the source file version is earlier than the target file, the files will be overwritten (if the version is the same, the files will be compared to the file creation date ).
1 indicates that if the target file exists, it will not be overwritten.
2 indicates that the target file is overwritten at any time.
[98] [2000]
The roles of the two sections are basically the same as those of the Section. The difference is that the content of section [98] is only installed on the Win9x system, the content in section [2000] is only installed on NT/2000/XP.
3. [CUT] Section
Vobsub Programs # setupname #=# Sysdir # \ rundll32.exe "# setupdir # \ codecs \ vsfilter. dll", directvobsub
This section is used to create shortcuts.
The left side of the equal sign is divided into five parts, separated. The first part represents the shortcut name. The second part indicates the start position of the shortcut (desktop, Start Menu, and so on), which is represented by predefined variables. The third part indicates the subdirectory of the shortcut based on the second part. Optional (# setupname # can only be used in this part. The fourth part indicates the icon resource file to be used, the fifth part indicates the icon index number, and 0 indicates the first icon in the resource. Note: Part 4 and Part 5 should be used at the same time (or not used); otherwise, the program will judge the problem.
The right side of the equal sign is divided into three parts, separated. The first part indicates the shortcut execution file, including the path. The second part is the execution path. The third part is the execution parameters. If there is no parameter, the second part of the path can be omitted; if there is a parameter, the second part must be specified, that is, the path.
The function of [shortcut98] [shortcut2000] is similar to that of [shortcut], but it is only valid for Win9x and NT/2000/XP respectively.
Iv. Section [detect]
Rootkey = HKEY_LOCAL_MACHINE
Subkey = SOFTWARE \ Classes \ CLSID \ {0180e49c-13bf-46db-9afd-9f52292e1c22}
Valuename =
Valuedata =
File = # setupdir # \ mplayerc.exe
This section checks the values written by installed components in the registry. If it is found, the component is displayed in bold and automatically deselected.
Rootkey = HKEY_LOCAL_MACHINE
Indicates the root key.
Subkey = SOFTWARE \ Classes \ CLSID \ {0180e49c-13bf-46db-9afd-9f52292e1c22}
Indicates the subkey.
Valuename =
Key name
Valuedata =
Key Value
Note: currently, only key values of the string type can be detected.
File = # setupdir # \ mplayerc.exe
This Section detects installed files.
5. The [system. ini] section * applies only to Win9x
This section is added to be compatible with Win9x. The project added to the system configuration file system. ini of Win9x.
Driver32, vidc. XviD = XviD. dll
The content before the comma indicates the name of the Section. The content after the comma is added to this section. Public variables are supported.
Vi. [dir] Section
[Dir]
# Setupdir # \ codecs =
This section is used to create a directory on the left of the equal sign.
[Dir98] [dir2000]
The functions of these two sections are to create directories in Win9x and 2000/XP systems.
7. Run the specified program after the component is installed or before uninstallation (the old version of the running function is canceled ).
The [setup_run] and [uninstall_run] sections are added to the component script to control programs that run after and before the component is installed.
[Setup_run]
# Sysdir # \ im1_l.exe /? # Sysdir # = alwaysnowaitshow
# Sysdir # \ notepad.exe = alwayswaithide
[Uninstall_run]
# Sysdir # \ im1_l.exe /? = Alwaysnowaitshow
# Sysdir # \ notepad.exe = alwayswaithide
The left side of the equal sign is divided into three parts: command line, parameter, and runtime path. The parameter and runtime path can be omitted. Note: If you need to specify the runtime path while omitting the parameter, the delimiter before the parameter cannot be omitted, that is, two consecutive "" must be used. Example:
# Sysdir # \ notepad.exe # Sysdir # = beforealwayswaithide
The right side of the equal sign is divided into three parts, which are separated.
The first available values are always and normal. Always indicates that the program is run even with Silent Installation (Note: This part is meaningless in the [uninstall_run] section ).
In the second part, the available values are wait and Nowait, indicating that after the external program is run, it will be returned again after the end and return immediately (Note: The wait parameter is best used in the [uninstall_run] section, to avoid uninstallation because the program is not running ).
The third part has the available values show and hide, indicating that the interface is displayed or hidden when an external program is running.
The content of the [setup_run] section is only run after installation, and the content of the [uninstall_run] section is only run before installation.

Public variables (Note: All path formats have no final "\", for example, C: \ WINDOWS, rather than c: \ windows \)
Part 1 (applicable to the file directory and the Registry File *. Reg ):
# Setupdir # installation path, for example, C: \ Program file \ Media Player classic
# WINDIR # Windows directory, for example, C: \ WINDOWS, c: \ winnt
# Sysdir # Windows System directory, such as: C: \ WINDOWS \ SYSTEM, c: \ winnt \ system32, c: \ windows \ system32
# Progdir # program file directory, for example, C: \ Program File
The second part (applicable to the starting position of the shortcut, that is, the cut Section ):
Desktop
Desktopdirectory desktop directory
Fonts font directory
Nethood network neighbors
Personal my document directory
Programs Start Menu program directory
Sendto "sent to" Directory
Startmenu Start Menu directory
Startup Start Menu startup Item directory
Favorites favorites directory
Appdata: the data storage folder of the current user's specific application, for example: C: \ Documents ents and Settings \ admin \ Application Data
Quick_launch Quick Start bar
Common_topics topdirectory all user desktop Directories
Common_favorites favorites for all users
Common_programs all user Start Menu program directory
Common_startmenu all user Start Menu Directories
Common_startup all user Start Menu startup Item Directories
Part 3 (applicable to conflicts between file names or directories and delimiters when writing scripts, such as [setup_run] and other sections ).
Character replacement macro
= <Myinstall_equals>
, <Myinstall_comma>
<Myinstall_vline>
# <Myinstall_num_sign>
Press ENTER <myinstall_enter> to use the content (Component Description) in the [main] section of the component script ).
# Setupname # installation package name, for example, Media Player classic (applicable only to the shortcut subdirectory ).

Note:
1. All text files, such as setup. ini, mpcplugin. ini, Reg. Reg, and unreg. Reg, should use ANSI encoding instead of Unicode to ensure compatibility with Win9x. The format of the reg file should also be Win9x, that is, the first behavior "regedit4 ".

Use WinRAR to compress the files. Select "Create an archive file in the self-released format" during compression (you can also select "Create a fixed archive file" to reduce the volume ), select the "SFX option" button in "advanced", enter "setup.exe" in the general/installer/release, and select "decompress to Temporary Folder" in "mode ", "overwrite all files" is used for "Overwrite mode". If you want to use the same style as that of my version, please use this Site's MPC. copy sfx to the WinRAR directory, select the "Hide startup dialog box" in "silent mode", and specify the MPC in the Auto Release module. SFX.

Silence

If you use a 7-zip package, run the following command:
Copy/B 7zs. SFX + mympc.7z mympc.exe
Or:
7z A-sfx7zs. SFX mympc.exe *-R

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.