[Unattended] Parameters for automating application installation.

2003-11-11 Thread DE-LOS-SANTOS,ORIOL (HP-Spain,ex1)
In our win2000 clients we often have to install software that requires the
input of some parameters in order to customize the user connection data.

Is there a way to easily add additional questions in the initial phase of
the Unattended installation in order to provide extra parameters that could
be then be available during the execution of the application installation
scripts?

If this is not possible it would be a nice feature to have available.

Thanks
Oriol de los Santos


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info


Re: [Unattended] Parameters for automating application installation.

2003-11-11 Thread Patrick J. LoPresti
DE-LOS-SANTOS,ORIOL (HP-Spain,ex1) [EMAIL PROTECTED] writes:

 Is there a way to easily add additional questions in the initial
 phase of the Unattended installation in order to provide extra
 parameters that could be then be available during the execution of
 the application installation scripts?

Yes, but you will need to learn a little Perl.

Start by reading http://unattended.sourceforge.net/advanced.html,
especially the later sections.

Then look at the simpler settings in Z:\dosbin\install.pl for ideas...

By way of example, you could create a Z:\site\config.pl like this:

use warnings;
use strict;

$u-{'_hp'}-{'ExtraInfo1'} =
sub {
my $ret;
while (!defined $ret) {
$ret = simple_q (Enter HP ExtraInfo1:\n);
}
return $ret;
};

This creates a new section [_hp] and a new setting ExtraInfo1 in the
answer file.  It causes install.pl to stop and ask the user a question
to obtain the value.  If the user provides no answer, it will ask
again until it gets one.

Suppose the user answers hi there.  Then this section will appear in
C:\netinst\unattend.txt:

[_hp]
ExtraInfo1 = hi there

Now you just need a way to read this information when it is time to
install your application.  The easiest way is to use the
Unattend::IniFile module from the distribution.  This means writing
your installation script in Perl and doing something like this:

use Unattend::Inifile;
my $u = new Unattend::Inifile ('C:\\netinst\\unattend.txt');
my $extra_info_1 = $u-{'_hp'}-{'ExtraInfo1'};
... (do what you want with $extra_info_1) ...

I realize this is a little skeletal.  But what you are asking is
complex enough that it requires using some kind of scripting language,
and Perl is as good a choice as any...

 - Pat


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info