Question

I want to know how the values of BATCH_INSTALL system variable changes during the installation process? In my installer when I was using it on Windows 7, during debugging I found that the value of BATCH_INSTALL system variable becomes -1 (i.e neither TRUE nor FALSE). So I want to know why the value of BATCH_INSTALL becomes -1?

Was it helpful?

Solution

The value -1 is the value of VARIANT_TRUE, a true value that works well with, or is required by, automation languages such as VB. There are so many definitions of "true" around, it can be hard to tell which one is being used. Generally the safest is to read values as zero and non-zero, and to specify either as 0 and 1, or as 0 and -1, depending on context. You only get tripped up there if someone has a "special" meaning for -1.

This is confirmed at both extremes by http://community.installshield.com/archive/index.php?t-118230.html where not only are people confused by the -1, but the later posts agree it means the non-zero form of true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top