PDA

View Full Version : BATCH_INSTALL Failing



T.J. Regan
07-25-2002, 08:58 AM
I have a standard project that installs MDAC 2.7, as well as SQLDMO components. In order to run SQL Server scripts successfully, I have to wait until after the reboot if one is needed and run the scripts during OnRebooted(). If a reboot is required I want to store info in the registry until after the reboot.

The issue is that the BATCH_INSTALL variable is not telling me the truth.

Here's some code:

....
if (BATCH_INSTALL = TRUE) then
... store info in registry
else
... run the scripts
endif;
....

What happens is that the code will try to run the scripts, it will fail, then I'll get a reboot dialog!
I even tried setting BATCH_INSTALL=TRUE right above the if statement, and it still failed.
Any ideas what's wrong? Thanks.:confused:

RobertDickau
07-25-2002, 11:49 AM
Does it work if you change the test to---

if (BATCH_INSTALL) then
// etc.
---instead of explicitly comparing it to TRUE?

T.J. Regan
07-25-2002, 02:46 PM
That fixed it, Robert. Thanks.

Does that mean (BATCH_INSTALL=TRUE) is not a valid expression?

RobertDickau
07-26-2002, 09:04 AM
I can't find the reference, but I think BATCH_INSTALL is set to -1 instead of TRUE (1), when necessary; and of course
if (BATCH_INSTALL) then
... catches any nonzero value, so you don't have to worry about the specific value.