Page 1 of 1

Checking Serial Numbers with Administrative Installs

Posted: Mon May 15, 2006 3:00 am
by Gareth Owen
Hi guys, just a quick question.

We have set up some serial number checking within our installation.

but this is done during the User Interview stage, e.g. enter number, check number, if invalid, go back to enter new number.

In the case of Administrative installs, the dialogs do not appear, In fact I do not think that this section of code is even run.

Can you confirm, which parts of the code are run when doing admin installs (using the /s flag)

I actually want the user to enter the serial number as part of the Command line for the MSI,

but for this, where do I need to put my validation code, and how do I exit the MSI gracefully with some sort of logged information.

Cheers

Posted: Mon May 15, 2006 3:19 am
by Gareth Owen
And also,

If you run the administrative install on a PC with an old version of the software, there is no obvious information about what is happening.

In our case, the installation just quits without any further information.


Is this something to do with Instances?

Cheers

Posted: Mon May 15, 2006 4:14 am
by MichaelNesmith
The /s switch runs setup silently. Default values will be used for all dialog fields. You can pass different values when running from the command line, see the help file topic "setup command line parameters" for details.

Posted: Mon May 15, 2006 7:49 am
by Gareth Owen
So does it actually run the code in the dialog section?

In our case, after the reg dialog, the serial number is checked, if it is invalid, the serial number dialog would normally be re-displayed.

In the /s install, what would happen.

1) It ignores ALL the code in the dialog section, (from where to where?)
2) It runs the code but just does not display the dialog itself, (getting stuck in an infinite loop if the serial is invalid?)


Cheers

Posted: Mon May 15, 2006 3:05 pm
by MichaelNesmith
It would start looping infinitely, yes. Dialogs are all skipped with default values.

Posted: Tue May 16, 2006 1:33 am
by Gareth Owen
What I need to know is where exactly i need to put my validation code so that it will get run during a silent install.

At what point does the installation continue after the dialogs?

As a further point, is there a variable to determine if a silent install is taking place?

It would be useful if I can catch the silent installs and run a different validation script.

Cheers

Posted: Tue May 16, 2006 11:38 am
by MichaelNesmith
All of these are documented:

The SILENT variable indicates whether setup is running in silent mode, and can even be overriden (see pre-defined variables in help).

The topic "setup command line parameters" has examples of specifying variable values from the command line (such as your serial numbers).

Posted: Tue May 16, 2006 2:07 pm
by Gareth Owen
Thanks for the SILENT var :)

I have already managed to pass the serial number into the build, but I am still not sure exactly which bits get ignored.

is it just the Display Dialog being suppressed, or is the whole User Interview section skipped?

I have not managed to find this information in the help.


Cheers

Posted: Tue May 16, 2006 8:58 pm
by MichaelNesmith
Nothing in your code is skipped. Dialogs, message boxes are just not shown.

Posted: Wed May 17, 2006 1:29 am
by Gareth Owen
Ok, thanks that makes my life much easier.

:D

Is there also a way to log this information to the log file?
How would you normally indicate an installation failure in a silent install?

Cheers