Title: Message
It would be helpful if you say.
What version of unattended are you using?
What is line 933 in install.pl
To me it looks like something else than your script that is causing the problem.
my config looks something like this seems to work fine, I use install.pl 1.97 with some modifcations:
It looks on that version more like a diskformatting problem.
Looking again at your script why do you have the two lines below, try with out these two lines, I don't think you realy want them
Unless you realy know what you are doing (I don't):
 my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
        my $os_name = $media_obj->name ();
MY config.pl
 
$u->{'UserData'}->{'ProductID'} =
    sub {
        my $src = "">         
          if ($src =~ /Windows 2000/i) {
            return 'PRODUCT KEY';
        }
        elsif ($src =~ /Windows XP/i) {
            return  'PRODUCT KEY';
        }
        else {
            die "Unrecognized OS source directory $src";
        }
};

Thanks
Max

-----Original Message-----
From: pommerer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 27 January, 2004 1:52 PM
To: [EMAIL PROTECTED]
Subject: [Unattended] Problems with site/config.pl

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