cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dealkema
Level 3

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
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

I believe you can use $EMPTY_STRING$.
0 Kudos
dealkema
Level 3

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
0 Kudos
RobertDickau
Flexera Alumni

Perhaps see if the Output Debug Information action will help?
0 Kudos
dealkema
Level 3

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
0 Kudos
RobertDickau
Flexera Alumni

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.)
0 Kudos