InstallShield 2016 » InstallScript Language Reference

The LongPathToQuote function places double quotation marks around a long file name or removes the double quotation marks from a long file name.

For an explanation of long file names, see Long File Names.

Add double quotation marks to long file names that contain spaces before passing the long file names to the command line. You must remove the double quotation marks from long file names before converting them to short file names using the LongPathToShortPath function. If you do not, the quoted long file name remains intact.

Note • This function adds quotation marks only if there is a space character in the file name. For example, quotation marks are not added around C:\\ThisismyApp because it is a long file name without a space.


LongPathToQuote ( svPath, nParameter );


LongPathToQuote Parameters




Specifies a long file name and returns that name with or without quotation marks, depending on the value passed in nParameter.


Specifies whether quotation marks are to be added to the long path or removed from the long path. Pass one of the following predefined constants in this parameter:

TRUE—Quotation marks are added to the long path.
FALSE—Quotation marks are removed from the long path.

Return Values

LongPathToQuote Return Values

Return Value



Indicates that the function was successful.

< 0

Indicates that the function was not successful.

See Also