The 14 path buffer function of the INSTALLSHIELD internal library function
The path buffer function helps you process a string containing the lookup path. The path buffer function works in a unique temporary string variable as a path buffer. The path buffer is defined inside the InstallShield; all path string functions work on the contents of the path buffer.
These functions do not support long file names. Call the longpathtoshortpath forward to the equivalent short message name before passing the long file name to a path buffer function.
The path function helps you operate and create a path string. Once you create a path string, you can save it to your right file.
Pathadd
Add a path to the lookup path in the path buffer.
Pathdelete
Delete a directory from the path buffer.
Pathfind
Find a specific path or any path containing a specific name in the path buffer.
Pathget
Retrieve the current value of the path buffer.
Pathmove
Realize the path buffer.
Pathset
Assign a value to the path buffer.
14.1 Pathadd
Syntax: Pathadd (Szdir, Szrefdir, Brefdir, BPosition);
Description: The Pathadd function adds a path to the lookup path in the path buffer. Use this function you can specify a directory location associated with an existing directory in the path buffer. Alternatively, you can add this path as the first or last directory in the path buffer.
This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Then you can add a modified path buffer string to the AutoExec.bat file by using different batch file functions. This function does not support long file names. Call the longpathtoshortpath forward to the equivalent short message name before passing the long file name to a path buffer function.
parameter:
SZDir
Specifies the path to add to the path buffer.
Szrefdir
Specifies the path associated with the new path to be added to the current path buffer.
Brefdir
Specifies whether szrefdir is a fully qualified path. One of the following predefined constants in this parameter location:
Full: szrefdir is a fully qualified path (that is, includes a driver indicator and a full path to a directory).
Partial: szrefdir is only a directory name (no drive and path information).
BPosition
Specifies the location of SZDIR to be inserted relative to the szrefdir. One of the following predefined constants in this parameter location:
After: Specifies that SZDIR is inserted into szrefdir. If szrefdir specifies an empty string, SZDIR is inserted into the path end of the path buffer.
Before: Specify SZDIR before being inserted into szrefdir. If szrefdir specifies an empty string, SZDIR is inserted in front of the path in the path buffer.
return value:
0: Indicates that the function successfully adds a directory to the path buffer.
<0: Indicates that the function failed to add a directory to the path buffer.
annotation:
· If you specify a directory currently already existing in the path buffer in SZDir, InstallShield will copy it, and the directory location in front is not modified. InstallShield ignores the backslash at the end of the catalog name.
14.2 Pathdelete
Syntax: PathDelete (SZDIR, BDIR);
Description: PathDelete function deletes a specific path in the path buffer. You can specify a path name or enter a fully qualified path.
This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Call the Pathget to get the content in the path buffer, call the PathSet setting the content in the path buffer. This function does not support long file names. Call longpathtoshortpath forward to the equivalent short message name before transferring long file names to Pathdelete. parameter:
SZDir
Specifies the path to delete from the path buffer.
BDIR
Specifies whether szrefdir is a fully qualified path. One of the following predefined constants in this parameter location:
Full: szrefdir is a fully qualified path (that is, includes a driver indicator and a full path to a directory).
Partial: szrefdir is only a directory name (no drive and path information).
return value:
0: Indicates that the function successfully removes a directory from the path buffer.
<0: Indicates that the function failed to delete a directory from the path buffer.
14.3 patfind
Syntax: Pathfind (SZDir, SvResult, Bdir, BSearch);
Description: The PathFind function looks up from the path buffer. You can specify a directory with a fully qualified or only a directory name.
This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Then you can add this temporary path string to the AutoExec.bat file by using a different batch file function. This function does not support long file names. Call the longpathtoshortpath forward to transfer the long file name to Pathfind to convert it to the equivalent short message name.
parameter:
SZDir
Specifies the path to find in the path buffer.
SvResult
Returns the full directory and path in the path buffer returned by the function.
BDIR
Specifies whether szrefdir is a fully qualified path. One of the following predefined constants in this parameter location:
Full: szrefdir is a fully qualified path (that is, includes a driver indicator and a full path to a directory).
Partial: szrefdir is only a directory name (no drive and path information).
BSearch
Specifies where to start looking up. One of the following predefined constants in this parameter location:
Continue: Continue to find the end of the previous lookup in the path buffer.
Restart: Start looking up from the beginning of the path buffer.
return value:
0: Indicates that the function successfully finds a directory in the path buffer.
<0: Indicates that the function cannot find a directory in the path buffer.
14.4 Pathget
Syntax: pathget (svstring);
Description: The Pathget function retrieves the current saved in the path buffer (a temporary storage area created by calling PathSet). Path buffer allows you to create and edit a lookup path. When you edit the path, call Pathget to place the lookup path into a string variable, so you can pass it to other functions in your installer.
This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Then you can add this temporary path string to the AutoExec.bat file by using a different batch file function. This function does not support long file names. Call the longpathtoshortpath forward to transfer the long file name to Pathfind to convert it to the equivalent short message name.
parameter:
Svstring
Returns the content in the path buffer.
return value:
0: Indicates that the function successfully retrieves the path currently saved in the path buffer.
<0: Indicates that the function failed to retrieve the path currently saved in the path buffer. annotation:
The Pathget retrieves the search path from the path buffer and releases the memory assigned to the path buffer. The path buffer is then reinitial by calling the PathSet, otherwise the call to the Pathget will fail.
14.5 Pathmove
Syntax: Pathmove (SZDir, Szrefdir, Bdir, Brefdir, BPosition);
Description: The PathMove function repositions a directory to another in the path buffer. You can also use this function to locate a directory, relative to another directory or as the first or last item as a path string.
Call the Pathget to get the content in the path buffer, call the PathSet setting the content in the path buffer. This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Then you can add this temporary path string to the AutoExec.bat file by using a different batch file function. This function does not support long file names. Call longpathtoshortpath forwarded it to the equivalent short message name before transferring long file names to PathMove.
parameter:
SZDir
Specifies the full path or partial path repositioned in the path buffer.
Szrefdir
Specifies the path related to the path in the current path buffer and the path to the SZDIR to be moved. In order to move the path to the path to the path buffer in the path buffer, pass an empty string to this parameter.
BDIR
Specifies whether SZDIR is a fully qualified path. One of the following predefined constants in this parameter location:
FULL: Indicates that SZDIR contains a fully qualified directory name.
Partial: Indicates that SZDIR contains only the directory name.
Brefdir
Specifies whether szrefdir is a fully qualified path. One of the following predefined constants in this parameter location:
Full: Indicates that szrefdir contains a fully qualified path name.
Partial: Indicates that szrefdir contains only the directory name.
BPosition
Specifies the location of SZDIR to be inserted relative to the szrefdir. One of the following predefined constants in this parameter location:
After: Specifies that SZDIR is inserted into szrefdir. If szrefdir specifies an empty string, SZDIR is inserted into the path end of the path buffer.
Before: Specify SZDIR before being inserted into szrefdir. If szrefdir specifies an empty string, SZDIR is inserted in front of the path in the path buffer.
return value:
0: Indicates that the function successfully repositions a directory in the path buffer.
<0: Indicates that the function failed to reposition a directory in the path buffer.
14.6 PathSet
Syntax: PathSt (Szstring);
Description: The PathSet function saves a lookup path string to the path buffer. Then you can use other path functions to operate the buffer. The value of szstring must be an absolute path.
This function is independent of the path statement or path environment variable in the autoexec.bat file. It works only on the path buffer to help you create, modify, and operate findings. Then you can add this temporary path string to the AutoExec.bat file by using a different batch file function. This function does not support long file names. The longpathtoshortpath converted it to the equivalent short message name before transferring the long file name to PathSet.
parameter:
Szstring
Specifies a lookup path to be saved in the path buffer. The lookup path must be fully limited; that is, it must contain a driver indicator and a full path to a directory.
return value:
0: Indicates that the function successfully saves a lookup path to the path buffer.
<0: Indicates that the function failed to save a lookup path to the path buffer.