The Unattended project is designed to assist in the installation of Windows operating systems. It uses one of three boot methods (Diskette, CD-ROM, PXE Network) to access a network share (Samba or Windows). It then runs a perl installation script which collates Windows Unattended data with Unattended Project data to produce, with the right configuration, a fully unattended installation.
This document is intended as a supplement to, not a replacement for, the web site. It is based off a document originally posted to one of the two dedicated mailing lists: unattended-info and unattended-devel.
Note: I have used Unattended exclusively with Diskette and CD-ROM boot methods (both Linux and DOS). This document does not address PXE in any way.
Desired: DNS alias for your Unattended server named “ntinstall”.
Desired: Guest account access to the “install” share. Username: guest, Password: guest.
Useful, But Not Required: A modern (2.6 kernel) Linux system for customizing the Linux boot CD.
Useful, But Not Required: Any Linux system or Windows Cygwin for customizing the DOS boot disk/CD.
Note: The “Desired” prerequisites remove the need to change the default boot disk parameters. This is very convenient, but not necessarily advisable from a security standpoint.
https://sourceforge.net/project/showfiles.php?group_id=62053
http://prdownloads.sourceforge.net/unattended/unattended-[ver].zip?download
http://prdownloads.sourceforge.net/unattended/unattended-[ver]-dosboot.zip?download
http://prdownloads.sourceforge.net/unattended/unattended-[ver]-linuxboot.zip?download
Important Note: From here on, unattended-[ver] will be referred to as unattended.
http://www.delorie.com/pub/djgpp/current/v2/
http://www.delorie.com/pub/djgpp/current/v2/djdev[ver].zip
http://www.delorie.com/pub/djgpp/current/v2gnu/perl[ver].zip
http://www.delorie.com/pub/djgpp/current/v2apps/pico[ver].zip
http://www.delorie.com/pub/djgpp/current/v2misc/csdpmi[ver].zip
Extract djdev[ver].zip to /unattended/install.
Extract perl[ver].zip to /unattended/install/djgpp.
Extract pico[ver].zip to /unattended/install/djgpp.
Extract csdpmi[ver].zip to /unattended/install/djgpp.
You will now have the basic Unattended file structure:
/unattended/bootdisk | DOS Boot Disk files |
/unattended/html | Unattended Documentation |
/unattended/install | *** This is the directory you will mount as \\ntinstall\install *** |
/unattended/linuxboot | Linux Boot Disk files |
For example, for Windows XP SP1, you would copy the i386 folder to /unattended/install/os/winxpsp1, thus creating /unattended/install/os/winxp/i386.
Note: Unattended knows what OS is in the folder based on the folder content, not on the folder name.
Note: These directories must match the content of the script files in /unattended/install/scripts (if you want to use the prebuilt scripts. Trust me, you do).
For a DOS boot diskette, there are a couple more steps involved. The diskette images are stored in compressed format in: /unattended/bootdisk/images. You will need to uncompress the image for your network card.
Rename the file from /unattended/bootdisk/images/[network card].imz to [network card].img.gz. Then, if you are using Linux or Cygwin, gunzip [network card].img.gz. WinZip for Windows will also work, just rename the unzipped file. You will end up with a 1.44 Meg floppy image named [network card].img.
You can now use freeware utilities to write this image to a floppy. I suggest rawwritewin: http://uranus.it.swin.edu.au/~jn/linux/rawwrite.htm.
Note: There are utilities which will write compressed images to diskettes directly, but I have not found a freeware version. :-(
Using Linux or Cygwin, Run "make" from: /unattended/bootdisk. This will create the disk images and bootdisk.iso image with your specific login information.
These options will Override those in the default file, /unattended/install/lib/unattend.txt. BUT you must explicitly negate options that are listed in the default file if you don't want them.
*** This file is how you really make Unattended (almost) completely unattended. ***
For example: You do not want print services for Unix running, but the default file has:
[NetOptionalComponents]
LPDSVC=1
So add an entry to /unattended/install/site/unattend.txt:
[NetOptionalComponents]
LPDSVC=0
Optionally, you can modify the default file and disable it there, but you may forget that you've done so when Unattended 4.1 comes out. :-)
This file contains additions to the main /unattended/install/dosbin/install.pl script. You can automatically add the OemPnPDriversPath, and specify a product key based on the OS (among other things). See the Unattended site for some examples: http://unattended.sourceforge.net/advanced.html#perl
One of the hidden gems in Unattended are the Windows Notips files. These files handle all of the dirty registry tweaks you make to Windows after you login for the first time. Some examples are: Folder settings to show hidden/system files, Internet Explorer cache size, Command prompt auto-completion of commands, Command prompt buffer size.
The files are located at: /unattended/install/bin/[os name]-notips.pl. Even if you don't know any perl, I highly suggest taking a look at these and customizing them to your tastes. It is very easy to add your own tweaks. As long as perl is installed, you can run these scripts on any system after the fact, too!
Unfortunately, there is no 100% pure unattended installation. There is physical intervention necessary, after the main Windows installation starts, to either eject the boot CD/floppy, or modify the BIOS to prevent a PXE boot.
That being said, you can get pretty close. You need to supply answers to all of the stock questions. This is done using the files: /unattended/site/unattend.txt and /unattended/site/config.pl. What follows are the absolute minimum entries to install Windows XP unattended:
[UserData]
; Generate a Random Computer Name
ComputerName = *
; Full Name of the User
FullName = YourUserName
; Organization of the User
OrgName = YourOrganization[GuiUnattended]
; Set the default Administrator password
AdminPassword = PlainTextPassword[Identification]
; Join a Workgroup (not a Domain)
JoinWorkgroup = YOURWORKGROUP; Unattended script specific parameters. These are ignored by Windows.
[_meta]
fdisk_lba = 1
; Disallow fdisk confirmation.
fdisk_confirm = 0
; Create a partition that is only used for the Install Only!
fdisk_cmds = "fdisk /clear 1;fdisk /pri:2000;fdisk /activate:1"
format_cmd = "format c: /y /z:seriously /q /v: "
replace_mbr = 1
edit_files = 0
; This chooses the main installation type. Remove to force the menu.
top = ""
middle = ""
bottom = ""
; No NTP servers
ntp_servers = ""
# File to hold site-specific customizations.
# Enable maximum warnings and disallow sloppy constructs.
use warnings;
use strict;$u->{'UserData'}->{'ProductKey'} =
sub {my $media_obj =};
Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});
my $name = $media_obj->name ();if ($name =~ /Windows XP/) {
return 'YOURW-INDOW-SKEYG-OESHE-REZZZ';
}
return undef;# Make this file evaluate to "true".
1;
Unattended allows you to create a complete system, hardware independent (RAID is an exception!), with nothing more than a boot disk/CD (and not even that if you use PXE). It allows installation of most popular software packages, and is easily customizable to taste. It is useful for deploying standards in an office, or an emergency recovery situation at a remote site.
Thanks to Patrick LoPresti and all of the Unattended contributors for succeeding where Microsoft falls short.
What follows are my individual configuration files and modifications to the standard Unattended installation.
# File to hold site-specific customizations.
# Enable maximum warnings and disallow sloppy constructs.
use warnings;
use strict;
sub {$u->{'UserData'}->{'ProductKey'} =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 > 0or 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;
sub {$u->{'UserData'}->{'ProductID'} =my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});};
my $os_name = $media_obj->name ();
if ($os_name =~ /Windows XP/) {return 'YOURW-INDOW-SKEYG-OESHE-REZZZ';}
elsif ($os_name =~ /Windows Server 2003/) {return 'YOURW-INDOW-SKEYG-OESHE-REZZZ';} return undef;
sub {# Make this file evaluate to "true".my $media_obj = Unattend::WinMedia->new ($u->{'_meta'}->{'OS_media'});};
my $os_name = $media_obj->name ();
if ($os_name =~ /Windows 2000/) {return 'YOURW-INDOW-SKEYG-OESHE-REZZZ';}
elsif (defined $u->{'UserData'}->{'ProductKey'}) {# It is OK for us to return undef as long as there is a} die "No ProductKey nor ProductID!";
# ProductKey.
return undef;
:: Turn off System Restore todo.pl
"srconfig.pl --disable"
:: Enable Automatic logon for installation purposes
todo.pl "autolog.pl --logon=1 --user=Administrator --password=PlainTextPassword"
:: MIDDLE: Execute after primary install.
:: Defragment the drive to collect the free space.
:: todo.pl defrag.bat
:: Update windows and turn off annoying stuff.
todo.pl %%WINVER%%-tweaks.bat
:: WinXP specific tweaks.
:: Make the QuickLaunch toolbar visible.
todo.pl quicklaunch.bat
:: fixtz.pl - Work around daylight saving bug in XP unattended install
todo.pl fixtz.pl
Download AutoIt3.exe and place it in /unattended/install/bin.
Create an AutoIt3 script: /unattended/install/scripts/enu/quicklaunch.au3.
Run ("rundll32.exe shell32.dll,Options_RunDLL 1", "", @SW_HIDE)
WinWaitActive ( "Taskbar and Start Menu Properties")
WinShow ( "Taskbar and Start Menu Properties", "", @SW_HIDE)
WinActivate ( "Taskbar and Start Menu Properties")
$var = ControlCommand ( "Taskbar and Start Menu Properties", "", "Button5", "IsChecked", "")
If $var = 1 Then
WinClose ("Taskbar and Start Menu Properties")Else
ControlCommand ( "Taskbar and Start Menu Properties", "", "Button5", "Check", "")EndIf
ControlCommand ( "Taskbar and Start Menu Properties", "", "Button11", "Check", "")
Create a standalone batch file, /unattended/install/scripts/quicklaunch.bat, or add the following lines to another batch file:
:: Make the QuickLaunch toolbar visible in Windows XP.
todo.pl "AutoIt3 %Z%\scripts\%WINLANG%\quicklaunch.au3"
Comment Out:
Windows Journal Viewer update
Update for Windows Media Player Script Commands - 819639
Media Player 9.0
Windows Messenger Update
Microsoft DirectX 9.0b update
Microsoft .NET framework
Recommended update 822831
Recommended update 820888
Recommended update 818043
Modify: Windows Journal Viewer update - 828026
Download the proper file for MediaPlayer8.
todo.pl ".reboot-on 194 %Z%\updates\mediaplayer8\windowsmedia-q828026-x86-%WINLANG%.exe /passive /n /norestart"
Note: I do not personally need .NET, DirectX9, etc. Pick and choose the packages you need!
Note: This file works for Windows 2000 Server, too. Copy it to: /unattended/install/scripts/ws2ksp4-updates.bat
Comment Out:
Update for HighMAT Support in the Windows XP CD Writing Wizard
Movie Maker 2.0 update
Windows Journal Viewer update
Flaw In Windows Media Player May Allow Media Library Access (819639)
Media Player 9.0
Windows Messenger Update
Microsoft DirectX 9.0b update
Microsoft .NET framework
Recommended update 826942
Recommended update 814995
Recommended update 814995
Recommended update 810243
Recommended update 810243
Recommended update 817778
Recommended update 821253
Recommended update 820291
Recommended update 327979
Recommended update 327405
Recommended update 322011
Modify: Windows Journal Viewer update - 828026
Download the proper file for MediaPlayer8.
todo.pl ".reboot-on 194 %Z%\updates\mediaplayer8\windowsmedia-q828026-x86-%WINLANG%.exe /passive /n /norestart"
Note: Same comment as above, pick and choose the packages you need.
/unattended/install/os/winxpsp1/i386/$oem$
/unattended/install/os/winxpsp1/i386/$oem$/$1
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers/video
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers/chipset
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers/modem
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers/network
/unattended/install/os/winxpsp1/i386/$oem$/$1/drivers/audio
/unattended/install/os/ws2ksp4/i386/$oem$
/unattended/install/os/ws2ksp4/i386/$oem$/$1
/unattended/install/os/ws2ksp4/i386/$oem$/$1/drivers
/unattended/install/os/ws2ksp4/i386/$oem$/$1/drivers/intelinf
/unattended/install/os/ws2ksp4/i386/$oem$/$1/drivers/network
/unattended/install/os/ws2ksp4/i386/$oem$/$1/drivers/scsi
/unattended/install/os/ws2ksp4/i386/$oem$/TEXTMODE
; General user information[UserData]
ComputerName = *
FullName = FullName
OrgName = OrganizationName[GuiUnattended]
; Set Time Zone for Pacific Time.
TimeZone = 4
AdminPassword = PlainTextPassword[Unattended]
; Do not prompt if a driver has not been Signed.
DriverSigningPolicy = Ignore[Components]
; Do NOT Install IIS by default
iis_common = Off
iis_inetmgr = Off
iis_www = Off
; Docs suggest iis_pwmgr only works on Win2k, but do NOT include it
; anyway
iis_pwmgr = Off
; Do NOT Include docs
iis_doc = Off[TapiLocation]
CountryCode = 1
AreaCode = 555[Branding]
BrandIEUsingUnattended = Yes[Proxy]
Proxy_Enable = 0[URL]
AutoConfig = 0
Home_Page = http://your.homepage.here
Search_Page = http://www.google.com/[NetOptionalComponents]
; Do NOT Install Print Services for UNIX
LPDSVC = 0[Identification]
JoinWorkgroup = YOURWORKGROUP; Unattended script specific parameters. These are ignored by Windows.
[_meta]
fdisk_lba = 1
; Modify the following to allow/disallow (1/0) fdisk confirmation.
fdisk_confirm = 0
; This partition is only used for the Install Only!
fdisk_cmds = "fdisk /clear 1;fdisk /pri:2000;fdisk /activate:1"
format_cmd = "format c: /y /z:seriously /q /v: "
replace_mbr = 1
edit_files = 0
; This chooses the main installation type. Remove to force the menu.
top = "base.bat"
middle = "middle.bat"
bottom = ""
; No NTP servers
ntp_servers = ""
; Force an install of Windows XP SP1.
OS_media = "Z:\os\winxpsp1"
; Force an install of Windows 2000 SP4.
; OS_media = "Z:\os\win2ksp4"
; Force an install of Windows 2000 Server SP4.
; OS_media = "Z:\os\ws2ksp4"
; General user information[UserData]
ComputerName = *
FullName = FullName
OrgName = OrganizationName[GuiUnattended]
; Set Time Zone for Pacific Time.
TimeZone = 4
AdminPassword = PlainTextPassword[Unattended]
; Do not prompt if a driver has not been Signed.
DriverSigningPolicy = Ignore[Components]
; Do NOT install Media Clips or MSN Explorer.
Media_clips = Off
msnexplr = Off
; Turn ON Terminal Services.
TSEnable = On[LicenseFilePrintData]
AutoMode = PerSeat[TapiLocation]
CountryCode = 1
AreaCode = 555[Branding]
BrandIEUsingUnattended = Yes[Proxy]
Proxy_Enable = 0[URL]
AutoConfig = 0
Home_Page = http://your.homepage.here
Search_Page = http://www.google.com/[MassStorageDrivers]
"Adaptec I2O RAID Adapters for Windows 2000 & XP 32bit" = "OEM"[OEMBootFiles]
TXTSETUP.OEM
DPTI2O.CAT
DPTI2O.SYS
OEMSETUP.INF
ADPTMGT.INF
EUROLGC.INF
W2KPREP.EXE
TRANS.TBL
DPT_I2O[Identification]
JoinWorkgroup = YOURWORKGROUP[NetOptionalComponents]
; Do NOT Install Print Services for UNIX
LPDSVC = 0; Unattended script specific parameters. These are ignored by Windows.
[_meta]
fdisk_lba = 1
; Modify the following to allow/disallow (1/0) fdisk confirmation.
fdisk_confirm = 0
; This partition is only used for the Install Only!
fdisk_cmds = "fdisk /clear 1;fdisk /pri:2000;fdisk /activate:1"
format_cmd = "format c: /y /z:seriously /q /v: "
replace_mbr = 1
edit_files = 0
; This chooses the main installation type. Remove to force the menu.
top = base.bat
middle = middle.bat
bottom = ""
; local_admins = ""
ntp_servers = ""
Force an install of Windows 2000 Server.
OS_media = "Z:\os\ws2ksp4"