Page 1 of 1

Persistent Variable

Posted: Thu Jun 21, 2007 6:39 am
by dmostert2
Hi,

At what stage does a persistent variable actually become persistent?

Before or after Apply Install??

I have the following code that does not seem to work:

This happens before prerequisites install... So on every re-boot during prerequisites, the same code get executed, even though I only want it to execute the first time.

Code: Select all

 if Variable DATE_CHECK_PASSED not is Defined
   Set Persistent Variable DATE_CHECK_PASSED to FALSE


   Do some work. On fail, Terminate Installation

otherwise

   Set Persistent Variable DATE_CHECK_PASSED to TRUE
 end


What am I doing wrong?

Thanks,
D.

Posted: Sat Jun 23, 2007 5:49 am
by dmostert2
Any ideas / help?

Thanks,
D.

Posted: Tue Jun 26, 2007 9:27 am
by jimo
I believe they are persisted only after apply install, if you need to save a value before apply install write the value to the registry or to a text file.

Posted: Wed Jun 27, 2007 2:31 am
by dmostert2
Thanks,

But doesn't Write to registry also only happen after Apply Install?

I'll try the write to file option then.