PathAdd
InstallShield 2022 » InstallScript Language Reference
The PathAdd function adds a path to the search path in the path buffer. With this function you can specify the position of the directory in relation to an existing directory in the path buffer. In addition, you can add the directory as the first or the last directory of the path buffer.
This function has no relationship to the path statement in the Autoexec.bat file or the path environment variable. It acts only on the path buffer, which helps you build, modify, and manipulate search paths. You can then add the modified path string to the Autoexec.bat file using the various batch file functions.
Syntax
PathAdd ( szDir, szRefDir, bRefDir, bPosition );
Parameters
Parameter |
Description |
||||||
szDir |
Specifies a path to add to the path buffer. Note:If you specify a directory in szDir that currently exists in the path buffer, InstallShield does not duplicate it, and the position of the pre-existing directory is not modified. InstallShield ignores a backslash at the end of the directory name. |
||||||
szRefDir |
Specifies the path in the current path buffer relative to which the new path will be added. |
||||||
bRefDir |
Specifies whether or not szRefDir is a fully qualified path. Pass one of the following predefined constants in this parameter:
|
||||||
bPosition |
Specifies the position relative to szRefDir at which szDir is to be inserted. Pass one of the following predefined constants in this parameter:
|
Return Values
Return Value |
Description |
0 |
Indicates that the function successfully added a directory to the path buffer. |
< 0 |
Indicates that the function was unable to add a directory to the path buffer. |
See Also