InstallShield 2019 » InstallScript Language Reference
The LongPathToShortPath function converts a long file name to its equivalent short file name. The parameter svPath can be an absolute path or a relative path, and it may include a file name; but the folder or file it specifies must exist on the target system.
For an explanation of long file names, see Long File Names.
Syntax
LongPathToShortPath ( svPath );
Parameters
Parameter |
Description |
svPath |
Specifies a long file name and returns its associated short file name. Note • LongPathToShortPath removes trailing backslashes from long file names. |
Return Values
Return Value |
Description |
0 |
Indicates that the function was successful. |
< 0 |
Indicates that the function was not successful. |
Additional Information
Since LongPathToShortPath can succeed only if the specified folder or file can be found on the target system, you may need to set the current folder before specifying a relative path. For example, if svPath contains the relative path InstallShield, which exists in the folder C:\Program Files, the setup is not able to find it unless the current folder is C:\Program Files. Use the ChangeDirectory function to change the current folder when necessary before calling LongPathToShortPath so that the target folder or path can be found.
See Also
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |