Title: Message
I'm trying to have the unattended setup create an OEMinfo.ini that gets put in %windir%\system32
I would like some variable information inserted into the OEMinfo.ini file.
I tried some code in config.pl
 
    open (OEMinfo, ">OEMinfo.ini") || die ("Could not open file. $!");
    print OEMinfo "[General]\n"; 
    print OEMinfo "Manufacturer = xxxxxxxxxxxxxxxxxx, Inc.\n"; 
    print OEMinfo "Model = Serial #####\n"; 
    print OEMinfo "SupportURL = http://<www.fullercomputer.com>\n"; 
    print OEMinfo "LocalFile = C:\\Winnt\\Web\\LocalFilename.htm\n"; 
    print OEMinfo "\n"; 
    print OEMinfo "[Support Information]\n"; 
    print OEMinfo "Line1= Product Key $product_key_q\n"; 
    close (OEMinfo);
 
I get "global variable $product_key_q requires explicit package name"
 
However in the same config.pl file I have this info:
 
    $u->{'_meta'}->{'ntp_servers'} = undef;
    $u->{'UserOEMinfoa'}->{'OrgName'} = undef;
   
    my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
    my $os_name = $media_obj->name ();
   
    if ($os_name =~ /Windows XP Home/) {
        $u->read (dos_to_host ('z:\\site\\xphoem.txt'));
    }
    elsif ($os_name =~ /Windows XP Pro/) {
        $u->read (dos_to_host ('z:\\site\\xppoem.txt'));
    }
    else {
        die "Unrecognized OS name: $os_name";
    }
 
Which appears to work just fine. I'm guessing it is because I haven't declared $product_key_q
 
One more question when I have config.pl create/open a file, where exactly is it creating the file or how can I direct it to create the file in Z:\site?
 

Reply via email to