Hello Ben,
i know that text file. But i want to have one 'ProductKey.csv'. The rest of the configuration is stored in XML files.
. o O( Maybe i should put the keys in there too? Hmmm... )
regards, stefan.
Ben Greenfield wrote:
Not that I have had any particular success but I think this is a job for the unattend.csv.
This is a text file that should be referenced by the config.pl and can generate an the appropriate unttend.txt files.
These files can be found in install/site directory
I think...
Please report results if any.
Thanks,
Ben
On Feb 9, 2005, at 9:15 PM, Stefan Schlesinger wrote:
Allan Stones wrote:
Stefan Schlesinger wrote:
Hello folks,
i'm using the code above to automatically lookup the product-keys,
but actually it looks like it never passes the key to the unattended.txt.
here is the code from site.pl: [code] maybe someone could tell me whats wrong?
regards, stefan.
Hi stefan, here is the code that i use :)
#################################### # Enterkey based on OS type chosen # ####################################
$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/) {
return 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX';
}
return undef;
};
$u->{'UserData'}->{'ProductID'} =
sub {
my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
my $os_name = $media_obj->name ();
if ($os_name =~ /Windows 2000/) {
return 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX';
}
elsif (defined $u->{'UserData'}->{'ProductKey'}) {
# It is OK for us to return undef as long as there is a
# ProductKey.
return undef;
}
die "No ProductKey nor ProductID!";
};
This method works fine for me. i play it in the 'config.pl'. My unattended.txt
in \lib also has 'productid' in there but it is commented out :)
Hello Allan, first of all, thanks for your reply.
Hmm..actually not exactly what i want. I think it's pretty annoying if you have to change the code each time you change a product key or even want to add one.
greetings, stefan.
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ unattended-info mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unattended-info
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ unattended-info mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unattended-info
