Embedding Quotation Marks

InstallShield 2020 » InstallScript Language Reference

You can insert double quotation marks as part of a string literal using one of two methods. If you begin the string literal with double quotation marks, you must use the \" escape character to embed double quotation marks. You can, however, begin the literal with a single quotation mark and then type the double quotation mark:

    //These two statements will both yield embedded double quotation marks

    szQuote1 = "Who said, \"Quitters never win\"?";

    szQuote2 = 'The same guy who said, "I quit. "';

To embed a single quotation mark, either use the \' escape sequence or open the string literal with double quotation marks:

    //These two statements will both yield embedded single quotation marks

    szQuote1 = 'Who said, \'Nice guys finish last\'?';

    szQuote2 = "The same guy who said, 'I win.'";

Note:Your setup scripts must use the standard quotation marks (" and ') found to the right of the semicolon (;) key on the standard U.S. keyboard. Do not use open or closed typographer's quotation marks (“”), such as this help files uses outside of example scripts.