How to set the folder path. How to register static routes? Syntax and main keys of the route utility

Specify the path to the folder. The main question of our article, which dear guests will find an answer to, is the question: How to specify the path to a folder on Windows, and at the beginning of the article we want to talk about exactly this. In order to find out the address of the folder, we invite our dear reader to turn on your computer and log into My Computer. Then find this folder to which you want to point the path and look at the top of the window. At the top of the window there is an item called address and next to it a cell similar to the cell in our browser to which we write website addresses. This cell will contain the address of your folder. Copy it and paste it on the document in which you want to indicate the folder address.

ZIP folder. Many people download files archived in ZIP format from various sites and find it difficult to open them. Throughout this article, we want to tell such people about opening this archive format and, accordingly, continuing to read, dear guest will learn about how to open a ZIP folder. In order to open a ZIP archive folder, you first need to download and install the WinRAR ZIP archiver program. There are two ways to download the archiver: You can search Google or Yandex for this archiver, or install the ZIP archiver from the Windows disk. Today, all Windows DVD discs have additional programs, and among the additional Windows programs there must be a ZIP archiver. After installing the archiver, just click on the archive file and it will open.

Delete a folder from drive C. For those who do not know how to delete a folder from drive C, we explain: It must be said right away that in drive C it is not possible to delete folders with the names: Documents and settings, Program files and Windows. But it is possible to delete some folders inside these folders that do not belong to system programs or files. If some file that does not belong to the system is not deleted, this may mean that this folder contains a virus and does not allow deletion.

Folder Desktop. The last topic of our article is devoted to the question: How to find the desktop folder? In order to find the desktop folder, you need to go to My Computer. Then go to drive C and go to the Documents and settings folder. On Documents and settings there is a folder All users inside of which there is a Desktop folder.

Windows 8 folder. Unfortunately, our article is close to the end and at the end of our article we want to give the dear reader information on how to delete the Windows 8 folder. Unfortunately, the Windows 8 folder cannot be deleted because it ensures the operation of Windows. But if someone wants to delete the Windows folder because someone else wants to install it, we assure you that during the installation of a new Windows, the Windows 8 folder itself is erased and trying to delete it before installing a new Windows is pointless.

We hope that this article helped you solve your problems and wish you good luck in your personal life!

Instructions

Start recording the full path to the file by indicating if this file is located on one of the local media of this computer. This letter is assigned to all disk readers, as well as virtual disks. The letter must be followed by a colon. For example:C:

Use the "" (backslash) character as a separator between directories when writing the full path to a file on a Windows system. Place this sign before each folder name and before the file name. For example:C:Program FilesAvirakeyHBEDV.KEY

Begin an entry with two backslashes ("\") when it contains the full path to a network resource on Windows systems. The two slashes must be followed by the name of the computer on the network, and the rest of the file path must be written in the usual way. For example, the full path to file.txt located in the SharedDocs folder named HomeComp would be written as:\HomeCompSharedDocsfile.txt

Use forward slash ("/") when specifying file paths on Unix systems. For example: /home/folderOne/file.txt

Specify the protocol type at the beginning of the full path to files posted on the Internet. These addresses use a forward slash as a delimiter..pngHere http: indicates the protocol type (HyperText Transfer Protocol). The “full path” in relation to Internet addresses is usually called the “absolute address”.

Use a shorthand notation for the file path if it is sufficient to indicate its location relative to some . For example, if the image file logo.png is stored in the same folder as the web page in which it is placed, then it is not necessary to specify the full path to it. The path to this image relative to the page will contain only the file name. If, for example, in the directory with the web page file there is a folder called images in which this picture is placed, then its relative address can be written like this: images/logo.png

Starting from the root directory, go all the way path, clicking on the plus signs, to the program folder in the “Program Files” folder. The address bar will contain all path before the program.

Using the context menu or the keyboard shortcut “Ctrl” + “C”, copy to the clipboard path, and then paste it into the form or command line. After the folder name, put "" and type the name of the executable file. Way to program registered

It is much more convenient to launch programs using shortcuts. This eliminates the need to open a hard drive partition, then a folder, and only then launch the program. The same situation applies to folders. It's easier to create a shortcut for it and open it in a second with a double click. But sometimes there is a need to find out file, to which this label is attached. For example, if you need to move the source folder to another location.

You will need

  • - Computer with Windows OS.

Instructions

In order to determine path To file, right-click on the shortcut for which you want to install it. After this, a context menu will appear, in it you need to select the “Properties” command. Next, a window will appear in which click on the “Shortcut” tab.

The window that appears has several options. The "Working Folder" parameter specifies the name of the folder where the file that the shortcut refers to is located, and the "Target" parameter specifies the full path to him. First, in the “Object” line, the hard disk partition is marked, and then the folder in which it lies. At the bottom of the window is the “File Location” option. If you left-click on it, a window will open with the folder where the file is stored.

If, for example, you need to find path To file a certain process that is running in the operating system, then you can do it like this. Press the Ctrl-Alt-Del key combination on your keyboard, after which a window will appear on your computer screen. In this window you need to select “Task Manager”. Or press the keyboard shortcut Ctrl-ShIft-Esc and it will launch immediately.

In the task manager that appears, go to the “Processes” tab. From the list, select the process for which you want to find out path To file by right-clicking on it. After this, a window with information about the object will appear. In the “Type” line there will be information about its type, and just below there will be a “Location” line. It indicates the complete path To file. Also, if you click on the “Details” tab, you can find out additional information about it, for example, its original name, etc. If you wish, you can find out about the digital signatures of an object, for this you just need to go to the tab, which is called: “Digital signatures."

If you often have to deal with all kinds of scripts, then sooner or later the task of specifying the exact address of the file that needs to be transferred to the program will arise. Most often this is done using an absolute address. "Absolute" or "full" path to file is a string variable containing a list of all nested folders on the path from the root directory to this file.

Instructions

If you need to find out the absolute file, stored on a computer running Windows OS, you can do this using the file manager of this system - Explorer. Open it by double-clicking the My Computer icon on your desktop or selecting the same option from the main Start menu. There is another way - use the keyboard shortcut Win and E.

Using the folder tree in the left frame of Explorer, navigate to the directory containing the file you need. Select and copy (Ctrl + C) the contents of the address bar of the file manager - this is the complete path to the folder containing the file. If you are using the Windows 7 version, then the Explorer address bar will contain path To file in a form that is convenient for use, but does not comply with the standard. To bring it to the standard form, left-click somewhere in the address bar space free of inscriptions - this will be enough for the application to display path in the desired way and select it, and all you have to do is copy the selection.

Paste the copied path into any page opened in any text editor. It will indicate the full address of the folder, but not the file - add the file name, including the extension, separating it from the inserted line with a backslash (). To avoid mistakes, the file name can also be copied in Explorer. To do this, click it once with the mouse, press the f2 function key, then the ctrl + c key combination, and exit the name editing mode by pressing the Esc key.

On Unix systems, use a backslash (/) to separate folders when specifying a file address. Most often, the need to find out the full path To file on computers running Unix OS it arises for the use of this file by server scripts used in Internet programming. In such cases, you can use the functionality of the corresponding programming language. For example, in PHP the complete path to executable file contains an environment variable called script_filename ($_SERVER["SCRIPT_FILENAME"]).

Full to file is needed, as a rule, to pass it as a parameter to some handler program. Most often, this task arises when programming some processes, but sometimes you just need to check the location of an object with the path specified in the instructions. This parameter contains a list of all directories, starting with the root, that must be opened sequentially to get to the desired file.

In the field located to the right of the file manager's address bar, enter the name of the file and wait until the program looks through all subdirectories and finds objects whose names have something similar. Full path will be placed in the “Folder Path” column of the search results table. There is no need to rewrite it manually - right-click this line, select the “Properties” line in the context menu that appears and copy the contents of the “Location” field of the window that opens.

If for some reason you must use the command line interface, use the DOS where command. She needs to set the R parameter to make the file search recursive, that is, to search all subfolders. In addition to this, be sure to indicate the name of the required file, and an optional parameter may be a part of the path to it known to you. This command also searches, so specifying at least part of the path will reduce the time spent on it. For example, if you need to get a complete path To file with the name RM.csv, which is only known to be on drive F, the command should be written like this: where /R f: RM.csv

After typing the command and its parameters, press Enter and at the end of the search you will find the complete path in the next line of the interface. Unfortunately, you can’t select and copy just this line here, so right-click anywhere in the window, select “Select All” from the menu, and then press Enter. In this way, you will place all the contents of the command line interface on the clipboard, which can be cleared of unnecessary lines in some text editor.

Sometimes the path to the folder you need in the registry is not indicated entirely correctly. The reasons may also be exposure to harmful viruses. This problem requires an urgent solution, because if the path to the desired program is not specified correctly, then it will be impossible to install plugins and updates for it. And this will entail many problems and the operation of the system will be difficult. In this article we will help this problem and tell you how to register the path to a file or folder.

How to specify the path to a file. Instructions

  • If you want to find out how to register the path to a file, you need to right-click on the shortcut. A context menu will pop up, there is a “Properties” command, select it. As a result, a window will appear and there will be a “Shortcut” tab, click.
  • In the window that appears, you will see some parameters, namely: “Working folder”, which serves as the name of the folder in which the file is located. The label points to it; "Object" is the full path to the file. First, in the “Object” parameter, we see the hard drive, then we see the folder where it is located. “File location”, by clicking with the left mouse button, you open the folder in which the file is located.
  • For example, you need to find how to register the path of a particular process running in the operating system. We'll tell you how to do this. You need to press the Ctrl-Alt-Del keys on your keyboard, as a result of which a window will open on your computer monitor, there will be a “Task Manager”. You can also launch it right away, then you will have to press the Ctrl-ShIft-Esc keys.
  • In Task Manager, go to Processes. There will be a list, you will need to select a process through which you will find out the path to the file, this can be done using the right mouse button. Then there will be information about the object. The "Type" line contains information about its type. Below is “Location”. This line will indicate the full path to the file. And if you click the “Details” tab, then you will find out the accompanying information about it. For example: original name; copyright and the like. To find out about the digital signature of an object, you need to go to the “Digital Signatures” tab.

How to specify the path to a folder. Instructions

  • You need to find “Run a program”; to do this, in the “Start” menu you find “Run” and make a choice.
  • You will be presented with an input line. In this line you need to write “regedit”, which is the name of the registry. When you enter the word and click on OK, you will find yourself in the working registry window.
  • On the left you will see a certain number of folders; from this list, select the “HKEY_LOCAL_MACHINE” folder. Having made your choice, click on it twice or once on the cross.
  • Next, you need to find “SOFTWARE” in the list; as a rule, it tends to display folders with programs and games included in the registry.
  • By opening the "SOFTWARE" document in the same way as "HKEY_LOCAL_MACHINE", you will find the folder you need by its name.
  • Having selected it with one click of the left mouse button, look in the right part of the window for the displayed keys of the folder you need. You should make sure of its importance, keeping in mind that the exe file is there. In reverse order, you will not be able to see the keys. On the key line, in the “Value” item, there is an answer to the question of how to register the path to the folder.
  • In order for the folder path to be correct, you need to change it. Double-click on the key and write down in the value line the address that leads to your data folder.

Hello everyone, today I’ll tell you how to register a static route in Windows using the route command line utility and how to view the Windows routing table. The route utility displays and modifies entries in the local IP routing table. When you may need to add a windows route, you don’t need to look far for an example, the simplest thing is that you need to route traffic to a specific local network, it is clear that the default gateway must know all the routes, but this is not always possible for a number of reasons and not correct network construction. By the way, if anyone is interested, I told you how to configure routes in centos, I advise you to look at it to broaden your horizons.

Adding a windows route

Adding a Windows route begins by studying the syntax of the command responsible for this, open the command line as an administrator and enter the following command:

When run without parameters, the route command displays help.

route [-f] [-p] [command [endpoint] [gateway] ] ]

  • -f Clears the routing table of all entries that are not a host route (routes with a subnet mask of 255.255.255.255), a loopback network route (routes with an endpoint of 127.0.0.0 and a subnet mask of 255.0.0.0), or a multicast route (routes with endpoint 224.0.0.0 and subnet mask 240.0.0.0). When this option is used in conjunction with one of the commands (such as add, change, or delete), the table is cleared before the command is executed.
  • -p When used with the add command, the specified route is added to the registry and used to initialize the IP routing table each time TCP/IP is started. By default, added routes are not saved when TCP/IP is started. When used with the print command, displays a list of persistent routes. All other commands ignore this parameter. Persistent routes are stored in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes command Specifies the command that will be run on the remote system. The following table provides a list of valid parameters.
  • add > Adding a route
  • change > Changing an existing route
  • delete > Deleting a route or routes
  • print > Print a route or routes

Endpoint specifies the end point of the route. The endpoint can be the network IP address (where the host bits in the network address are set to 0), the IP address of the route to the host, or the value 0.0.0.0 for the default route. mask netmask Specifies the network mask (also known as subnet mask) according to the destination. The netmask can be a subnet mask corresponding to the network IP address, for example 255.255.255.255 for a route to a host or 0.0.0.0. for the default route. If this parameter is omitted, the subnet mask 255.255.255.255 is used. The endpoint cannot be more precise than the corresponding subnet mask. In other words, the value of bit 1 in the endpoint address is not possible if the value of the corresponding bit in the subnet mask is 0. gateway Specifies the forwarding or next hop IP address at which the set of addresses defined by the endpoint and the subnet mask is accessible. For locally connected subnet routes, the gateway address is the IP address assigned to the interface that is connected to the subnet. For remote routes that are accessible through one or more routers, the gateway address is the directly accessible IP address of the nearest router. metric metric Specifies an integer route cost metric (ranging from 1 to 9999) for a route, which is used when selecting one of several routes in the routing table that most closely matches the destination address of the forwarded packet. The route with the lowest metric is selected. The metric reflects the number of hops, path speed, path reliability, path throughput, and administrative tools. if interface Specifies the index of the interface through which the destination is accessible. To list the interfaces and their corresponding indexes, use the route print command. Interface index values ​​can be either decimal or hexadecimal. Enter 0x before hexadecimal numbers. In the case where the if parameter is omitted, the interface is determined from the gateway address. /? Displays help on the command line.

Large values ​​in the metric column of the routing table are a result of TCP/IP's ability to automatically determine routing table route metrics based on the configuration of the IP address, subnet mask, and default gateway for each LAN interface. Automatic interface metric detection, enabled by default, sets the speed of each interface and the route metrics for each interface so that the fastest interface creates routes with the lowest metric. To remove large metrics, disable automatic interface metric detection in the TCP/IP protocol advanced properties for each local network connection.

Names can be used for the endpoint parameter if there is a corresponding entry in the Networks database file located in the system_root\System32\Drivers\Etc folder. The Gateway parameter can specify names as long as they resolve to IP addresses using standard host resolution methods, such as querying the DNS service, using the local Hosts file located in the system_root\system32\drivers\etc folder, or NetBIOS name resolution .

If the command is print or delete, the gateway parameter is omitted and wildcards are used to specify the destination and gateway. The endpoint value can be a wildcard value that is indicated by an asterisk (*). If there is an asterisk (*) or question mark (?) in the endpoint description, they are treated as wildcards and only routes that match the destination are printed or deleted. An asterisk matches any sequence of characters, and a question mark matches any single character. 10.*.1, 192.168.*, 127.*, and *224* are valid examples of using an asterisk as a wildcard character.
If you use an invalid combination of endpoint and subnet mask (net mask) values, you receive the following error message: "Route: Invalid gateway address subnet mask." The error occurs when one or more bits in the endpoint address are 1 and the corresponding bits in the subnet mask are 1. To test this condition, express the endpoint and subnet mask in binary format. A binary subnet mask consists of a sequence of one bits representing part of the endpoint's network address and a sequence of zero bits representing part of the endpoint's host address. Check for any 1 bits in the portion of the destination address that is the host address (as determined by the subnet mask).
The -p option is supported in the route command only on Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP. This option is not supported by the route command on Windows 95 and Windows 98.

This command is available only if the Internet Protocol (TCP/IP) is installed as a component in the network adapter properties in the Network Connections object.
Examples

To display the entire contents of the IP routing table, enter the command:

or command

To display routes from the IP routing table that begin with 10., enter the command:

route print 10.*

To add a default route with the default gateway address 192.168.12.1, enter the command:

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

To add a route to endpoint 10.41.0.0 with a subnet mask of 255.255.0.0 and a next hop address of 10.27.0.1, enter the command:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1

To add a permanent route to endpoint 10.41.0.0 with a subnet mask of 255.255.0.0 and a next hop address of 10.27.0.1, enter the command:

route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1

To add a route to endpoint 10.41.0.0 with a subnet mask of 255.255.0.0 and a hop address of 10.27.0.1 and a cost metric of 7, enter the command:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7

To add a route to endpoint 10.41.0.0 with a subnet mask of 255.255.0.0 and a next hop address of 10.27.0.1 and using interface index 0x3, enter the command:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0x3

This note will help you find out the ID of the interface you need.

To remove the route to endpoint 10.41.0.0 with a subnet mask of 255.255.0.0, enter the command:

route delete 10.41.0.0 mask 255.255.0.0

To remove all routes from the IP routing table that begin with 10., enter the command.

Dancer,

SpoilerTarget"> Spoiler: Constants

Constants
The main role in the script is played by constants. Constants are always enclosed in curly braces ( ). The installer (or uninstaller) assigns values ​​to constants that are determined by the user or based on the system configuration. For example, (win) will be interpreted by the compiler as "C:\WINDOWS" if the OS is installed in this folder.

The character "(" is treated as the beginning of a constant. If you need to enter "(", type it twice. (You do not need to double ")" characters.)

If a constant is followed by a backslash ("\"), the installer will automatically remove it if the constant already ends with a backslash. For example, if const has the value "C:\" and we enter ( constantname)\filename, you will end up with "C:\filename", and not "C:\\filename", as it should logically be. If you want to output exactly "C:\\filename", the backslash will have to be enclosed in curly braces: (const)(\)\filename.

List of supported constants.

Folder Constants
(app)
The folder where the application is installed. It is selected by the user in the window Selecting a destination folder during installation.
For example: if you entered (app)\MYPROG.EXE in the Source parameter and the user wanted to install your program in "C:\MYPROG", the output would be "C:\MYPROG\MYPROG.EXE".

(win)
The folder where Windows is installed.
For example: entered (win)\MYPROG.INI, Windows folder "C:\WINDOWS", the output is "C:\WINDOWS\MYPROG.INI".

(sys)
Windows system folder.
For example: entered (sys)\CTL3D32.DLL Windows system folder "C:\WINDOWS\SYSTEM", the output is "C:\WINDOWS\SYSTEM\CTL3D32.DLL".

On 64-bit Windows, by default, the System32 path returned by this constant points to the folder containing 32-bit system files, just like on 32-bit Windows. (The constant can be overridden to enable 64-bit mode.)

(syswow64)
On 64-bit Windows, the system folder is SysWOW64, usually "C:\WINDOWS\SysWOW64". This is the directory where 32-bit system files are located.

Do not use this constant unless you need to get the name of the directory where 32-bit system files are located. Repeated use of (syswow64) in places where (sys) would suffice may cause problems. (For an example, see the documentation for the section's sharedfile flag.)

(src)
The folder in which the installer is located.
For example: you entered (src)\MYPROG.EXE, the installer was launched from "S:\", the output is "S:\MYPROG.EXE".

(sd)
The system drive on which Windows is installed. This is usually "C:". This constant is equivalent to an environment variable SystemDrive.

(pf)
Path to the Program Files folder. (pf) is equivalent to (pf32) if the installer is not running in 64-bit mode, otherwise it is equivalent to (pf64).

(pf32)
Path to the system's 32-bit Program Files folder, typically "C:\Program Files" on 32-bit Windows and "C:\Program Files (x86)" on 64-bit Windows.

(pf64)
For 64-bit Windows only: 64-bit program files. Path to the 64-bit system Program Files folder, typically "C:\Program Files". An exception will be thrown if you attempt to use this constant on 32-bit Windows.

(cf)
Common files - Common Files. (cf) is equivalent to (cf32) if the installer does not run in 64-bit mode, otherwise it is equivalent to (cf64).

(cf32)
32-bit shared files. The path to the system's 32-bit Common Files folder, typically "C:\Program Files\Common Files" on 32-bit Windows and "C:\Program Files (x86)\Common Files" on 64-bit Windows.

(cf64)
For 64-bit Windows only: 64-bit shared files. Path to the 64-bit system Common Files folder, typically "C:\Program Files\Common Files". An exception will be thrown if you attempt to use this constant on 32-bit Windows.

(tmp)
Temporary folder. This Not the value of the user's TEMP environment variable. This is the folder where temporary installer files are created ("C:\WINDOWS\TEMP\IS-xxxxx.tmp"). All files and folders are deleted from the Temp folder after the application installation is complete. This constant is used if the section contains files that are necessary during installation, but not needed for further operation of the application.

(fonts)
Fonts folder. Typically called FONTS and located in the Windows folder.

(dao)
DAO folder. Equivalent to (cf)\Microsoft Shared\DAO.

(dotnet11)
.NET Framework version 1.1 32-bit root folder.

An exception will be thrown if you attempt to use this constant on a system that does not have the .NET Framework version 1.1 installed.

(dotnet20)
Root folder of .NET Framework versions 2-3.5. (dotnet20) is equivalent to (dotnet2032) if the installer does not run in 64-bit mode, otherwise it is equivalent to (dotnet2064).

(dotnet2032)
The 32-bit root folder of the .NET Framework versions 2-3.5.

An exception will be thrown if you attempt to use this constant on a system that does not have the .NET Framework versions 2-3.5 installed.

(dotnet2064)
For 64-bit Windows only: 64-bit root folder of .NET Framework versions 2-3.5.

An exception will be thrown if you attempt to use this constant on a system that does not have the .NET Framework versions 2-3.5 installed.

(dotnet40)
The root folder of .NET Framework versions 4 or higher. (dotnet40) is equivalent to (dotnet4032) if the installer does not run in 64-bit mode, otherwise it is equivalent to (dotnet4064).

(dotnet4032)
The 32-bit root folder of .NET Framework versions 4 or higher.

An exception will be thrown if you attempt to use this constant on a system that does not have .NET Framework versions 4 or later installed.

(dotne4064)
For 64-bit Windows only: 64-bit root folder of .NET Framework versions 4 or later.

An exception will be thrown if you attempt to use this constant on a system that does not have .NET Framework versions 4 or later installed.

Special folder constants
Inno Setup also uses other constants called special folder constants. They are used in the same way as folder constants.

"common" constants are common to all user profiles.

The "user" constants are taken from the profile of the current user on whose behalf the installer is running. And the user is often not the one who is logged in, so use "user" constants with caution.

As already stated, the special folder constants apply to all versions of Windows that support Inno Setup.

* = the "common" constant is equal to the "user" constant if the user installing the application is an administrator or PrivilegesRequired=lowest.

(group)
The path to the Start menu group that the user can change on the page Select a folder from the Start menu. This folder is always created for all user profiles, unless the user installing the application has administrative rights, otherwise the path is set only for the current user's profile.

(localappdata)
Path to the local application folder (not Roaming).

(sendto)
Path to the user's Send To folder (there is no shared Send To folder).

(userappdata) & (commonappdata)
Path to the Application Data folder.

(usercf)
Path to the current user's Common Files folder. The constant is only supported on Windows 7 and later. When used in previous versions of Windows, the value of the constant will be replaced by (localappdata)\Programs\Common.

(userdesktop) & (commondesktop) *
Path to the desktop folder.

(userdocs) & (commondocs)
Path to the My Documents folder.

(userfavorites) & (commonfavorites) *
Path to the Favorites folder.

(userpf)
Path to the current user's Program Files folder. The constant is only supported on Windows 7 and later. When used in previous versions of Windows, the value of the constant will be replaced with (localappdata)\Programs.

(userprograms) & (common programs) *
Path to the Programs folder in the Start menu.

(userstartmenu) & (commonstartmenu) *
Path to the "root" of the Start menu.

(userstartup) & (commonstartup) *

(usertemplates) & (common templates) *
Path to the templates folder.

Other constants
{\}
Backslash. Read the rules for using (\) and \ at the beginning of this page.

{%NAME|DefaultValue}
Inserts the value of an environment variable.

  • NAME- environment variable name
  • DefaultValue- defines the text that will be inserted if the constant does not exist
  • To insert a comma, vertical bar ("|"), or closing curly brace (")"), write the character in the form "%-character code.". Replace the character with the "%" character and its two-digit hexadecimal code. The comma is "%2c", the vertical bar is "%7c", and the closing brace is "%7d". If you want to include the "%" character, use "%25".
  • NAME And DefaultValue
For example:
(%COMSPEC)
(%PROMPT|$P$G)
(cmd)
Full path to the standard system interpreter. This is usually Windows\System32\cmd.exe. This does not use the COMSPEC environment variable.

(computername)
The name of the computer on which the installer or uninstaller is running (the result of the function GetComputerName).

(drive: Path}
Returns the drive letter and colon from the specified path (for example, "C:"). If installed over a network, returns the server name and the shared document name (for example, "\\SERVER\SHARE").

  • Path- defines the path.
  • Path
Examples:
(drive:(src))
(drive:c:\path\file)
(drive:\\server\share\path\file)
(groupname)
The name of the folder that the user selected on the page Select a folder from the Start menu. Unlike the constant (group), this constant is equal to the folder name "Start", and not the full path to it.

(hwnd)
(Special Purpose) Handle to the installer background window.

(wizardhwnd)
(Special Purpose) Handle to the installer wizard window. Equal to "0" if the window does not exist at the time of calling.

(ini: Filename,Section,Key|DefaultValue}
Takes the value from the .INI file.

  • Filename- name of the ini file from which reading is performed
  • Section- section name
  • Key- key name
  • DefaultValue- the value returned if the parameter does not exist
  • To insert a comma, "|", or ")", write the desired character in the form "%-character code.". For example, a comma is "%2c", a vertical bar is "%7c", ")" is "%7d". "%" = "%25".
  • Filename, Section, And Key may contain constants. Note that the closing curly brace is specified using the method described above only when it is used on its own. If it denotes a constant, such refinements are not needed.
For example:
(ini:(win)\MyProg.ini,Settings,Path|(pf)\My Program)
(language)
Built-in name of the selected language. For help, please refer to the section.

(cm: MessageName}
(cm: MessageName,Arguments}

Returns a standard message in the specified language.

  • MessageName- name of the standard message from which reading is performed. For help, please refer to the section.
  • Arguments- message arguments separated by commas
  • To insert a comma, "|", or ")", write the desired character in the form "%-character code.". For example, a comma is "%2c", a vertical bar is "%7c", ")" is "%7d". "%" = "%25".
  • Each argument in Arguments may contain constants. Note that the closing curly brace is specified using the method described above only when it is used on its own. If it denotes a constant, such refinements are not needed.
For example:
(cm:LaunchProgram,Inno Setup)
The example outputs "Launch Inno Setup" if the language is English.

(reg:HK xx\SubkeyName,ValueName|DefaultValue}
Returns the registry value.

  • H.K. xx- defines the root key. For help, please refer to the section
  • SubkeyName- section name
  • ValueName- parameter name. Empty parameter = "Default".
  • DefaultValue- value returned if the parameter does not exist or is not a string type (REG_SZ or REG_EXPAND_SZ)
  • To insert a comma, "|", or ")", write the desired character in the form "%-character code.". For example, a comma is "%2c", a vertical bar is "%7c", ")" is "%7d". "%" = "%25".
  • SubkeyName, ValueName, And DefaultValue may contain constants. Note that the closing curly brace is specified using the method described above only when it is used on its own. If it denotes a constant, such refinements are not needed.
For example:
(reg:HKLM\Software\My Program,Path|(pf)\My Program)
(param: ParamName|DefaultValue}
Returns command line parameters.
  • ParamName- parameter name
  • DefaultValue- the value returned if the requested value does not exist or cannot be determined.
  • To insert a comma, "|", or ")", write the desired character in the form "%-character code.". For example, a comma is "%2c", a vertical bar is "%7c", ")" is "%7d". "%" = "%25".
  • ParamName And DefaultValue may contain constants. Note that the closing curly brace is specified using the method described above only when it is used on its own. If it denotes a constant, such refinements are not needed.
For example:
(paramath|(pf)\My Program)
Returns c:\My Program if /Path="c:\My Program" is entered on the command line.

(srcexe)
The full path of the installer, for example "C:\SETUP.EXE".

(uninstallexe)
The full path of the uninstaller, for example "C:\Program Files\My Program\unins000.exe". This constant is most often used in the section to set the uninstaller icon. Effective only if the section's Uninstallable directive is set to yes (the default).

(sysuserinfoname)
(sysuserinfoorg)

The name and organization, respectively, to which Windows is registered. This information is taken from the registry.

(userinfoname)
(userinfoorg)
(userinfoserial)

The name, organization, and serial number that the user provided on the page User information(this page can be activated by the UserInfoPage directive). Typically these constants are used in and sections to store their values ​​for later use.

(username)
The name of the user who ran the installer or uninstaller (result of the function GetUserName).

(log)
The name of the system log file, or an empty string if logging is not enabled.