Hi,

On the Advanced Configuration (web)page there is an example, "Assigning product

key based on OS type".� I copied the code exactly as it appears on the page,

replaced the "MY-WINDOWS-XP-KEY" ,"MY-WINDOWS-2000-KEY" and "MY-SERVER-2003-KEY"

entries to contain my serial numbers:

 
------------------------------------------------------------------------------------
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/) {
����������� return 'MY-WINDOWS-XP-KEY';
������� }
������� elsif ($os_name =~ /Windows Server 2003/) {
����������� return 'MY-SERVER-2003-KEY';
������� }
������� 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 'MY-WINDOWS-2000-KEY';
������� }
������� 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!";
��� };
------------------------------------------------------------------------------------
The program works as expected for Windows 2000, but not for WINXP and WIN2003. 
When I select WINXP or WIN2003, the script stops with the error:
could not do z:\site\config.pl: Function not implemented (ENOSYS) at z:\dosbin\install.pl
line 933
 
I played a little with the code: e.g.:
------------------------------------------------------------------------------------
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/) {
����������� return 'MY-WINDOWS-XP-KEY';
������� }
������� elsif ($os_name =~ /Windows Server 2003/) {
����������� return 'MY-SERVER-2003-KEY';
������� }
������� return undef;
��� };
 
------------------------------------------------------------------------------------
The program works as expected for WINXP and WIN2003 but not for WIN2000. 
When I select WIN2000, the script stops with the error:
could not do z:\site\config.pl: Function not implemented (ENOSYS) at z:\dosbin\install.pl
line 933
------------------------------------------------------------------------------------
 
any Ideas?
 
Regards 
Werner

 

----------------------------------------------------------
Werner Pommerer           email:
[EMAIL PROTECTED]
Rechenzentrum             Universit�t Hohenheim
Schlo� Westhof S�d        Telefon: +49 (0711) 459 2837
70593 Stuttgart           Fax:     +49 (0711) 459 3449
----------------------------------------------------------

Reply via email to