This is a great question.  I apologize that our documentation is not
up to the task.

This would make a great example if anyone wants to start collecting a
FAQ...

Dag Nummedal <[EMAIL PROTECTED]> writes:

> > How can I modify the scripts so that it doesn't ask for
> > partitioning (i want whole disk c:), formats it, overwrites MBR,
> > adds user setup to local admins, installs all drivers and runs
> > only base.bat (can modify this to install what i want)??
> 
> You don't really need to use perl for any (most?) of this.  In the
> c:\netinst folder on your machines you'll find an unattend.inf file,
> with the specifications you've made when installing.

Technically C:\netinst\unattend.txt.

> Take the parts you want from this file, and merge into your site
> unattended.inf file.

In particular, look over the [_meta] section.

If you create Z:\site\unattend.txt with the following contents, it
should do most of what you want:

[_meta]
    ; Use LBA extensions for fdisk
    fdisk_lba = 1
    ; Whole drive C:
    fdisk_cmds = "fdisk /clear 1;fdisk /pri:100,100;fdisk /delete
/pri:1;fdisk /prio:2000;fdisk /activate:1"
    ; Format C:
    format_cmd = "format /y /q /v: c:"
    ; Replace MBR
    replace_mbr = 1
    ; Add users to local admins group
    local_admins = "user1 user2 user3"
    ; Run base.bat when finished
    top = base.bat


The "install all drivers" part is harder.  You could manually copy
OemPnPDriversPath from a completed installation and add it to the
[Unattended] section of Z:\site\unattend.txt.  That will work, but it
will not automatically update itself when you add new drivers.  To get
it working automatically will require a little Perl code to compute
the OemPnPDriversPath value.

Try putting something like the following in Z:\site\config.pl (code
mostly cribbed from &ask_oem_pnp_drivers_path):

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

$u->{'Unattended'}->{'OemPnPDriversPath'} =
    sub {
        my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});

        my @pnp_driver_dirs = $media_obj->oem_pnp_dirs (1);

        # No driver directories means no drivers path
        scalar @pnp_driver_dirs > 0
            or return undef;

        print "...found some driver directories.\n";

        my $ret = join ';', @pnp_driver_dirs;

        # Setup does not like empty OemPnPDriversPath
        $ret =~ /\S/
            or undef $ret;

        return $ret;
    }
======================================================================

Let me know how it goes.

 - Pat


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to