Page 1 of 1

Persistent variables and patch builds

Posted: Thu Sep 10, 2009 7:20 pm
by DThrasher
During the initial installation of our product I set a persistent variable. We check the value of this persistent variable during an uninstall.

This works great during ordinary builds, but when I try to run a patch build I get an error message saying that the variable is undefined.

I tried using an If statement with the "is defined" operator in order to test whether the variable exists or not. This works fine during ordinary builds, but during a patch build I get the same error message.

It's strange to see a "variable is not defined" error on an If statement that checks whether the variable is defined!

Am I doing something wrong?

I'm using InstallAware 9 Build Moya.052409

Posted: Sun Sep 13, 2009 9:14 pm
by MichaelNesmith
Try and use the pre-defined compiler variable LOADOLDDATA to see if that helps.

Posted: Mon Sep 14, 2009 2:04 pm
by DThrasher
Thanks, Michael. I tried using

Code: Select all

Set Variable LOADOLDDATA to TRUE
at the top of my script, but that still didn't work.

I discovered another workaround for this issue. Using the BUILDMODE compiler variable, I can check to see whether I am in patch mode. This allows me to skip over the section with the persistent variable.

This works for my particular scenario, but it would still be nice to have access to persistent variables during a patch build.