PathMove

InstallShield 2015 » InstallScript Language Reference

The PathMove function repositions a directory in the path buffer to another location. You can also use this function to position the directory relative to another directory or as the first or the last item in the path string.

This function has no relation 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 this temporary path string to Autoexec.bat using the various batch file functions.

Tip: Call PathGet to get the contents of the path buffer. Call PathSet to set contents of the path buffer.

Syntax

PathMove ( szDir, szRefDir, bDir, bRefDir, bPosition );

Parameters

PathMove Parameters

Parameter

Description

szDir

Specifies a full or partial path to reposition in the path buffer.

szRefDir

Specifies the path in the path buffer relative to which the path in szDir will be moved. To move the path in szDir to the beginning or end of the path in the path buffer, pass a null string (“”) in this parameter.

bDir

Specifies whether szDir contains a fully qualified or an unqualified directory name. Pass one of the following predefined constants in this parameter:

FULL—Specifies that szDir contains a fully qualified directory name.
PARTIAL—Specifies that szDir contains the directory name only.

bRefDir

Specifies whether szRefDir contains a fully qualified or an unqualified directory name. Pass one of the following predefined constants in this parameter:

FULL—Specifies that szRefDir contains a fully qualified directory name.
PARTIAL—Specifies that szRefDir contains the directory name only.

bPosition

Specifies the position relative to szRefDir to which szDir is to be moved. Pass one of the following predefined constants in this parameter:

AFTER—Specifies that szDir is to be positioned after szRefDir. If szRefDir specifies a null string (“”), szDir is positioned at the end of the path in the path buffer.
BEFORE—Specifies that szDir is to be positioned before szRefDir. If szRefDir specifies a null string (“”), szDir is positioned at the front of the path in the path buffer.

Return Values

PathMove Return Values

Return Value

Description

0

Indicates that the function successfully repositioned a directory in the path buffer.

< 0

Indicates that the function was unable to reposition a directory in the path buffer.

See Also