Specifying the same include script twice in one .wse can cause an infinite loop

Article:TECH25453  |  Created: 2006-12-04  |  Updated: 2008-04-24  |  Article URL http://www.symantec.com/docs/TECH25453
NOTE: If you are experiencing this particular known issue, we recommend that you Subscribe to receive email notification each time this article is updated. Subscribers will be the first to learn about any releases, status changes, workarounds or decisions made.
Article Type
Technical Solution


Issue



Specifying the same include script twice in one .wse can cause an infinite loop. There are two cases when this occurs:

Case 1: The include scripts are referenced using relative paths
  1. Create an include script name include.wse that displays the variable TEST.
  2. Create a new .wse that contains the following code:
        Set Variable TEST to 1 
        Include Script include.wse (make sure to only specify the name, not the complete path)
        Set Variable TEST to %TEST% (Select increment from the Operation drop-down list)
        Include Script include.wse (again, only specify the name of the .wse)
  3. Save the .wse in the same directory as include.wse.
  4. Compile and run the .exe.

It is expected that only two messages will display. The first displaying "1" and the second displaying "2". Instead, you end up in an infinite loop where TEST is continuously incremented and displayed.

Case 2: An include script is called multiple times from another include script

  1. Create an include script name include.wse that includes include2.wse.
  2. Create an include script named include2.wse that contains the following code:
        Set Variable TEST to 1 
        Include Script <path to include.wse>  
        Set Variable TEST to %TEST% (Select increment from the Operation drop-down list)
        Include Script <path to include.wse>
  3. Create a new .wse that contains the code:
    Include Script <path to include2.wse>

Environment



Wise Package Studio 7.0,
Wise Package Studio 7.0 SP1
Wise Package Studio 7.0 SP2
Wise Installation Studio 7.0

Solution



This issue has been fixed in Wise Installation Studio/Express 7.0 SP1 and Wise Package Studio 7.0 SP3.

Workaround(s):

Case 1: If you do not have nested include scripts, this only appears to happen if you specify the include scripts as relative paths. Change the line

'Include Script include.wse'

to

'Include Script <full path to include.wse>' 

Case 2: If you have nested include scripts, you will need to make a copy of the include script.


Supplemental Materials

SourceDEFECT
ValueLB 55178
DescriptionLogged in Littlebuggy (Altiris - Lindon, Plymouth) database

Legacy ID



30705


Article URL http://www.symantec.com/docs/TECH25453


Terms of use for this information are found in Legal Notices