I have two check scripts for prerequisites which I made. One for PowerShell and the other for Java Runtime Environment. They are pretty simple and modeled after IA included scripts. While creating an installer and including these two prerequisites I get "Variable Not Defined". So I created a blank project and just included these two scripts to eliminate the possibility that other scripts were somehow causing the issue.
Both scripts compile with not problem on their own, so each script stands on it's own. If I change the order of the include Lines then the reported missing variable changes.
if the PowerShell check runs first the message is "Variable not defined: JRENEEDINSTALL" and the cursor is on "if Variable PS10_INSTALLED Equals FALSE"
If the JRE check runs first the message is "Variable not defined: PS10_INSTALLED" and the cursor is on "if Variable JRENEEDINSTALL Equals TRUE"
I can package this project is anybody want to take a look. IA checks for missing if > end statements which was my first thought. each script is so short you can see the whole thing in one screen so checking the if > end statements is pretty easy.
I am stumped, it is probably something very easy that I am missing.
Variable Not Defined
Re: Variable Not Defined
Make sure they are defined by a Set Variable command.
It's probably a good idea to post the code if you can't figure it out.
And by the way, if you create a Java Setup from the Template projects, it generates a check/installer for you. It's similar to the runtimes, but it doesn't create separate scripts. I'm not sure why we don't have Java listed as a runtime in the runtime view, but hopefully we will in the future.
It's probably a good idea to post the code if you can't figure it out.
And by the way, if you create a Java Setup from the Template projects, it generates a check/installer for you. It's similar to the runtimes, but it doesn't create separate scripts. I'm not sure why we don't have Java listed as a runtime in the runtime view, but hopefully we will in the future.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Variable Not Defined
Ok I have tried the the suggested solution. Turns out the JRE was not the issue.
Here is a video of what is happening on my system.
http://screencast.com/t/ulzUdw8sdqa8
I am using 9 R2. Hope you can help
Here is a video of what is happening on my system.
http://screencast.com/t/ulzUdw8sdqa8
I am using 9 R2. Hope you can help
- Attachments
-
- ScriptTester.zip
- Here is the project
- (59.14 KiB) Downloaded 401 times
Re: Variable Not Defined
I isolated the problem to your checkpervasivesql10 script.
It was this line specifically:
if Variable PSQL10_NEEDINSTALL_X86 Equals TRUE
I've been made aware of an issue that can occur when an existing script file is physically copied, then added back to a same project (as an include file)...
The problem has to do with a unique command identifier being shared by more than one command. In this case, even though two separate commands are visible in the IDE, at runtime, they resolve to one command only. From then on, command identifiers get duplicated...
You should be able to resolve this by cutting your code and pasting it back into the script.
I'll be putting together a KB article to clarify this...
Code: Select all
Comment: if Variable PSQL10_NEEDINSTALL_X86 Equals TRUE
if Variable PSQL10_NEEDINSTALL_X86 Equals TRUE
Set Variable PSQL10_X86 to FALSE
Set Variable PREREQ to TRUE
Set Variable PRELIST to $PRELIST$$NEWLINE$Pervasive PSQL v10
else
Set Variable PSQL10_X86 to TRUE
endif Variable PSQL10_NEEDINSTALL_X86 Equals TRUE
I've been made aware of an issue that can occur when an existing script file is physically copied, then added back to a same project (as an include file)...
The problem has to do with a unique command identifier being shared by more than one command. In this case, even though two separate commands are visible in the IDE, at runtime, they resolve to one command only. From then on, command identifiers get duplicated...
You should be able to resolve this by cutting your code and pasting it back into the script.
I'll be putting together a KB article to clarify this...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Variable Not Defined
Great thanks a lot.

