Inno Setup Directory Constants

Source: Internet
Author: User

{app} application directory, which is selected by the user in the Select Installation Directory page of the installation Wizard. For example: If you are using {App}\myprog. EXE as an item and the user chooses "C:\MYPROG" as the directory for the application, the installer converts it to "C:\MYPROG\MYPROG." EXE ".

{win} The Windows directory of the system. For example: If you are using {Win}\myprog. INI as an item and the system's Windows directory is "C:\WINDOWS", the installer will convert it to "C:\WINDOWS\MYPROG." INI ".

The Windows System (System) directory (under Windows nt/2000 is System32) for the {sys} systems. For example: If you are using {sys}\ctl3d32. DLL as an item and the system's Windows system directory is "C:\WINDOWS\SYSTEM", the installer will convert it to "C:\WINDOWS\SYSTEM\CTL3D32." DLL ".

{src} This folder points to the location where the installer is located. For example: If you are using {Src}\myprog. EXE as an item and the user is from the "s:\ Install, the installer will convert it to "S:\MYPROG." EXE ".

{SD} system drive, which is the drive to which Windows is installed, typically "C:" and for Windows nt/2000, this constant is equivalent to the system's environment variable "systemdrive".

{PF} Programs folder (program files), this path is the system's programming files directory, typically "C:\Program files".

{CF} public folder (Common files), this path is the Common Files folder of the system, typically "C:\Program Files\Common Files".

{tmp} temp directory, which is not the directory that the user's TEMP environment variable points to, but rather a subdirectory established by the installer in the user's temporary directory at startup (it has a name similar to "C:\WINDOWS\TEMP\IS-xxxxx.tmp"), All files and subdirectories will be deleted when the installer exits. This feature is useful for program files that are executed in the [Run] segment and are not required after installation.

{fonts} font directory, under Windows 95/nt 4+ a directory specifically for fonts (usually this directory is in the Windows directory and is named "Fonts"), this constant points to this directory. For Windows NT 3.51, this constant is equivalent to {SYS} because there is no font directory at that time.

{DAO} The DAO directory, when Setup runs on Windows 95/nt 4+, is equivalent to {Cf}\microsoft Shared\Dao, which is equivalent to {Win}\msapps\dao when running on Windows NT 3.51.

Shell (shell) folder constants Inno Setup also supports a separate set of directory constants, which is the shell (shell) folder constants that are involved, and they have the same usage as other directory constants. However, if you put the minversion=4,3.51 line in the [Setup] section of the script to allow support for NT 3.51, then only the {group} Shell folder constant can be used and can only be used in the [Icons] segment. The following constants containing "user" involve the user's private document (profile) that is currently logged on, while constants with "common" involve the private document (profile) of all users. When Setup runs under the Windows nt/2000 operating system and the user does not have administrator privileges, all constants with "common" force the equivalent of constants with "user". * tags indicate constants with "common" are equivalent to constants with "user" in the Windows 9x operating system. The path to the {Group} program group depends on the user's selection in the Select Program Groups page of the Setup Wizard. For Windows NT, this folder is always built on all users ' private documents (all user profiles), unless the user is installing the application that does not have administrator privileges, in which case it will be built in the user's private document (profile).

{SendTo} The path of the current user's "send". (There is no public "send" folder.) )

{Userappdata} & {Commonappdata} The path to the application data (application) folder.

{Userdesktop} & {commondesktop} * Desktop folder path, recommended desktop shortcut using {userdesktop}.

{Userdocs} & {Commondocs} The path to the "My Documents" folder (or for NT 4.0, refers to a private folder).

{userfavorites} & {commonfavorites} "Favorites" path, this constant is required to be minversion set at least "4.1, 4", currently only Windows 2000 support { Commonfavorites}, if you are using a previous version of Windows, then it will be converted to the same directory as {userfavorites}.

{Userprograms} & {commonprograms} * The path to the program folder inside the Start menu.

{Userstartmenu} & {Commonstartmenu} * Start Menu's rating path.

{UserStartup} & {Commonstartup} * The path of the Startup folder inside the Start menu.

{UserTemplates} & {commontemplates} template (Templates) folder path, currently only Windows 2000 support {commontemplates}, if you are using a previous version of the Windows, it will be converted to the same directory as {usertemplates}.

The other constant {\} is a backslash character, see the description of the constants {\} and the single character \ In use, as mentioned earlier on this page.

{%name} An environment variable is embedded, and this name is the name of the environment variable to use. If the environment variable specified in the user's system does not exist, the constant is replaced by an empty string.

{ComputerName} The name of the computer on which the Setup program is running (the return value of the "GetComputerName" function).

{groupname} The user selects the name of the program group on the Select a group page of the Setup Wizard, which is different from the {group}, which does not include the path.

{hwnd} (Specialized purpose) transmits the window handle of the installer background window.

{reg:hkxx\subkeyname,valuename| DefaultValue} to embed a registry value. Hkxx Specify the root key (root key), see the root key listed in the [Registry] section of the document. SUBKEYNAME Specifies the name of the child key to read. VALUENAME Specifies the name of the value to read, and the default value to read a key lets ValueName be empty. DefaultValue This value is embedded if the specified registry value does not exist or if it is not a string type (REG_SZ or REG_EXPAND_SZ). If you want to include a comma, the vertical bar (character "|" ) or curly braces closed arc "}" in the constant, you must use "%-code" in the form of "%" followed by a two-bit 16 code after the translation of the original character, a comma is "%2c", a bar symbol is "%7c", a curly brace closed arc is "%7d". DefaultValue can include constants, however, the closed arcs ("}") of the curly braces ("}") that are embedded in the above-mentioned constants must be changed to "%7d".

{Srcexe} The full name of the installer (including the whole path and file name), such as "C:\SETUP." EXE ".

{username} The name of the user running Setup (the return value of the function GetUserName).

Inno Setup Directory constants

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.