What I did was in z:\site\config.pl:
-----------------------------------------------------------------------------------------------------------------------------------
use warnings;
use strict;

my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
my $os_name = $media_obj->name ();

if ($os_name =~ /Windows 2000/) {
    $u->read (dos_to_host ('z:\\site\\win2k-un.txt'));
}
elsif ($os_name =~ /Windows XP Professional/) {
    $u->read (dos_to_host ('z:\\site\\winxppun.txt'));
}
elsif ($os_name =~ /Windows XP/) {
    $u->read (dos_to_host ('z:\\site\\winxp-un.txt'));
}
else {
    die "Unrecognized OS name: $os_name";
}

1;
----------------------------------------------------------------------------------------------------------------------------------------

This way it uses a different unattend.txt for each ver of XP. I did it because I had a license for pro & 1 for home, but didn't want to get it mixed up between the two. Also, Win2k which I also sometimes install uses a different product??? then xp, so I needed it different as well. I wasn't sure what to call the win xp pro unattend, since I assume that perl for dos can only use 8 character filenames.

At 11:26 AM 9/21/2004, you wrote:
No need.  Something like this in Z:\site\config.pl should do what you
want:

======================================================================
use warnings;
use strict;

$u->{'UserData'}->{'ProductKey'} =
sub {
my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
my $os_name = $media_obj->name ();
if ($os_name =~ /Windows XP Home/) {
return simple_q ("Enter license key for $os_name:");
}
elsif ($os_name =~ /Windows XP/ {
return 'MY-XP-KEY';
}
elsif ($os_name =~ /Windows Server 2003/) {
return 'MY-SERVER-2003-KEY';
}
return undef;
};


1;
======================================================================

Replace MY-XP-KEY with your volume license key.  I am assuming that
the string "Windows XP Home" appears in the OS name of the Home
edition; I do not have a copy myself.

 - Pat



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info



------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ unattended-info mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to