This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Detecting empty variables
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
12:10 PM
Detecting empty variables
Searched the manual, kb, etc., but couldn't find an answer ...
What is the right way to test a variable for for use as a rule? Do I just leave the right hand text box empty in the Compare InstallAnywhere Variables rule?
Unless there is a better way to accomplish what I need ...
1) For silent installs, the user needs to be able to pass in the USER_MAGIC_1 and USER_MAGIC_2 variables.
2) For non-silent, or if they aren't supplied, I want to use defaults (I already have an action taking care of this).
3) Since the USER_MAGIC variables are initialized late, on the command line using the -D to set CUSTOM1 and CUSTOM2.
4) Set the default USER_MAGIC folder variables.
5) If CUSTOM1 is not, set USER_MAGIC_1=CUSTOM1
6) do the same for CUSTOM2/USER_MAGIC_2
Thanks,
David
What is the right way to test a variable for
Unless there is a better way to accomplish what I need ...
1) For silent installs, the user needs to be able to pass in the USER_MAGIC_1 and USER_MAGIC_2 variables.
2) For non-silent, or if they aren't supplied, I want to use defaults (I already have an action taking care of this).
3) Since the USER_MAGIC variables are initialized late, on the command line using the -D to set CUSTOM1 and CUSTOM2.
4) Set the default USER_MAGIC folder variables.
5) If CUSTOM1 is not
6) do the same for CUSTOM2/USER_MAGIC_2
Thanks,
David
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
12:31 PM
I believe you can use $EMPTY_STRING$.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2009
02:54 PM
How do you tell if the rule evaluated true or false?
If I output $CUSTOM1$, it is populated. However, when I reset $USER_MAGIC_1$=$CUSTOM1$, it doesn't seem to happen. I've tried setting the rule to both $CUSTOM1$ is not equal to $EMPTY_STRING$ and $CUSTOM1$ is not equal to $NULL$.
I have the Evaluate at Assignment flagged as True.
Am I missing something. Can one variable set action be overridden by a subsequent one?
Thanks,
David
If I output $CUSTOM1$, it is populated. However, when I reset $USER_MAGIC_1$=$CUSTOM1$, it doesn't seem to happen. I've tried setting the rule to both $CUSTOM1$ is not equal to $EMPTY_STRING$ and $CUSTOM1$ is not equal to $NULL$.
I have the Evaluate at Assignment flagged as True.
Am I missing something. Can one variable set action be overridden by a subsequent one?
Thanks,
David
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 29, 2009
09:20 AM
Perhaps see if the Output Debug Information action will help?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 29, 2009
12:33 PM
I have an Output Debug Items with everything selected. When I look in the log, however, there are no entries for any $Variable$ values. This is all I get:
java.version == 1.6.0_14 (Java 1)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 14.0-b16
java.vm.specification.name == Java Virtual Machine Specification
java.vm.specification.vendor == Sun Microsystems Inc.
java.vm.specification.version == 1.0
java.specification.name == Java Platform API Specification
java.specification.vendor == Sun Microsystems Inc.
java.specification.version == 1.6
java.vendor == Sun Microsystems Inc.
java.vendor.url == http://java.sun.com/
java.class.version == 50.0
java.compiler == null
java.home == C:\Documents and Settings\Administrator\Local Settings\Temp\I1248821481\Windows\resource\jre
java.io.tmpdir == C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
os.name == Windows XP
os.arch == x86
os.version == 5.1
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.home == C:\Documents and Settings\Administrator
user.dir == C:\Documents and Settings\Administrator\Local Settings\Temp\I1248821481\Windows
user.language == en
user.region == null
java.version == 1.6.0_14 (Java 1)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 14.0-b16
java.vm.specification.name == Java Virtual Machine Specification
java.vm.specification.vendor == Sun Microsystems Inc.
java.vm.specification.version == 1.0
java.specification.name == Java Platform API Specification
java.specification.vendor == Sun Microsystems Inc.
java.specification.version == 1.6
java.vendor == Sun Microsystems Inc.
java.vendor.url == http://java.sun.com/
java.class.version == 50.0
java.compiler == null
java.home == C:\Documents and Settings\Administrator\Local Settings\Temp\I1248821481\Windows\resource\jre
java.io.tmpdir == C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
os.name == Windows XP
os.arch == x86
os.version == 5.1
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.home == C:\Documents and Settings\Administrator
user.dir == C:\Documents and Settings\Administrator\Local Settings\Temp\I1248821481\Windows
user.language == en
user.region == null
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 29, 2009
12:39 PM
As far as the variables go, at least, perhaps see this newsletter tip (PDF): http://www.acresso.com/webdocuments/PDF/ia_EvaluatingVariables.pdf. (There's also (another PDF): http://www.acresso.com/webdocuments/PDF/nl_tip_DEV_IA_show_all_variables.pdf.)
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)