WiseScript: "This variable has not been previously defined" error when selecting edit

Article:TECH26558  |  Created: 2007-03-01  |  Updated: 2008-04-24  |  Article URL http://www.symantec.com/docs/TECH26558
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



Selecting Edit in the prerequisite page for .exe that launches an external .msi with included prerequisite causes script actions to be deleted and an error to be displayed.

Steps to reproduce:

  1. Go to Build Options page in Installation Expert.
  2. Select Exe that launches .External .msi.
  3. Go to Prerequisits page and add the Prerequisite (Notepad*, for example).
  4. Select Edit.

Error message is displayed:
You have referenced the variable FILEPATH1. This variable has not been previously defined”

Running the program produces error “Cannot find the file .\myapp\FILEPA~1\setup.exe”


Environment



Wise Installation Studio\Wise Installation Express 7.0

Cause



Script actions are removed from the script when Edit is selected. The script changes at line 85. Script lines in a script after your Reset the script (85 through 96) are missing in the broken script after selecting the Edit button

Solution



This issue has been fixed for Wise Installation Studio\Express 7 SP1 and Wise Package Studio 7 SP3.

Workarounds:  

—After you delete the existing .WSE file, select the Reset button in the Prerequisites page to reset the script to the original format from before any changes were made.  This will reset the script and replace the missing script action.  If you have made edits to the script which you don't want to lose, follow these steps:

1.  Create a new package that uses the EXE Option EXE that launches MSI and after adding the prerequisite compile the installation.
2.   Open the .WSE by double clicking directly on it or opening WiseScript Editor or WiseScript Package Editor and browsing to the .WSE instead of using the Edit button in the prerequisits page. 
3.  Copy script actions 85 through 96 and paste them into the correct position into the existing script. 
4.  Do not use the Edit button to view or change the script.

—When a prerequisite is added to the product, do not hit the Edit button in the Prerequisites page.  If edits need to be made to the script, either double click on the .WSE or open WiseScript or WiseScript Package Editor from within your product and browse to the .WSE file that contains your prerequisites.

Note: See attached screenshot of missing actions.

Attachments

MissingActions.zip (15 kBytes)

Supplemental Materials

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

Legacy ID



33167


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


Terms of use for this information are found in Legal Notices