Guest blogger: Andrew Mallett

The Urban Penguin

There are many grades or levels of automation when deploying Windows 7 and, even, specific terms that Microsoft use such as "Lite Touch" and "Zero Touch". The simplest form of automation is using an answer file. This answer file can be accessed from many locations such as the root of a floppy or USB drive. Consider this though: why not add the answer file to the DVD itself? Let's look how...);

The answer file

In Windows 7, the name of the default answer file is autounattend.xml, (or at least the one that is searched for). You will guess from the name that it is no longer a text file but XML. This can be edited with any text editor or using the Windows System Image Manager which is included with the free WAIK, (Windows Advanced Installation Kit).

Where does Windows look for this

You could start setup.exe with the switch /unattend: and specify the name and location of the file. However this is not really automation and adds complications to the process. If you do not use the switch then the setup process will check many locations for the file autounattend.xml.

1 Registry

HKLMSystemSetup!UnattendFile

Specifies a pointer in the registry to an answer file. The answer file is not required to be named Unattend.xml.

2

%WINDIR%PantherUnattend

The name of the answer file must be Unattend.xml or Autounattend.xml.

NoteWindows Setup only searches this directory on downlevel installations. If Windows Setup starts from Windows PE, the %WINDIR%PantherUnattend directory is not searched.

3

%WINDIR%Panther

Windows Setup caches answer files to this location.

4

Removable read/write media in order of drive letter, at the root of the drive.

The name of the answer file must be Unattend.xml or Autounattend.xml, and the answer file must be located at the root of the drive.

5

windowsPE and offlineServicing passes:

Sources directory in a Windows distribution

All other passes:

%WINDIR%System32Sysprep

In the windowsPE and offlineServicing passes, the name of the answer file must be Autounattend.xml.

For all other configuration passes, the file name must be Unattend.xml.

7

%SYSTEMDRIVE%

The answer file name must be Unattend.xml or Autounattend.xml

We can see that the root of drive letters is supported and they are searched in alphabetical order, this means that out installation DVD will be searched we just need to add the file to the DVD.

Create your custom installation DVD

The first step is to create a working area on a PC with the WAIK installed. WAIK provides the WISM program to create and edit the answer file and also the tool we use to make the ISO once we have added the answer file.

Create your working directory. I would suggest something similar to this: md c:workingiso

Copy the contents of your Windows 7 DVD to c:workingiso

The boot file required to make a bootable DVD needs to be in the c:working directory: copy c:workingISOootetfsboot.com c:working

Once you have created your answer file save it to c:workingisoautounattend.xml. This ISO directory will be the root of the final DVD

Open the WAIK Deployment command prompt as administrator and use the oscdimg.exe to make the ISO:

Cd c:working

Oscdimg -m -n -o -b"etfsboot.com" iso customwin7.iso

Options:

  • -m ignore max size warning
  • -n allow long file names
  • -o optimize storage size
  • -b bootfile name
  • Iso is the directory we are burning to ISO
  • Customwin7.iso is the target iso filename

Now you have a Windows 7 iso that can be installed from or burned to DVD that has your corporate answer file build in to it and quite a simple process to build this with free tools from Microsoft.

Why I am doing this!

Well, it is simple, I have a need when building courses to be able to simplify the process as much as I can, a complete image is not always the answer and an unattended install from DVD or ISO is not that much longer than imaging. Having the DVD with the answer file means that the machine boot and installs, I do not have anything else to do. The only thing that I do not set is the Computer Name in the answer file but every other step including customizing IE and adding Favourites is done in the answer file. I will blog soon on the creating the answer file.

Microsoft™ Windows training courses

Interested in Windows 7? Enroll onto one of our great Windows training courses at CourseMonster.com.