Mark Minasi's Windows Networking Tech Page
Issue #60 Late January 2007

To subscribe, visit http://www.minasi.com/nwsreg.htm. To unsubscribe, link to http://www.minasi.com/unsubs.htm. To change e-mail address or other info, link to http://www.minasi.com/edit-newsletter-record.htm.  Visit the Archives at http://www.minasi.com/archive.htm.  Please do not reply to this mail; for comments, please link to www.minasi.com/gethelp.  Document copyright 2006 Mark Minasi.

What's Inside

  • News
    • Join Me At a Seminar!
    • One One-Day Hands-on Vista Deployment class comes to Dallas 27 February
  • Tech Section
    • Hands-Off Vista Installs with Answer Files and Windows System Image Manager
  • Conferences
  • Bring a Seminar to Your Site

News

Hi all —

This month, we build on last newsletter's Windows PE article with some more Vista deployment hands-on:  you'll see how to build a script — "answer file" in Microsoft-speak — that lets you install and configure Vista, automatically.  I'll walk you through doing a hands-on exercise of a hands-off install (so to speak), and then show you how to build your own answer files so that you can create your own personalized installation files.  It's considerably more flexible than the install tools we've met in earlier versions of Windows, and I think you'll find it useful.

But, first, a word from our sponsor...

My Three-Day Server 2012/2012R2 Class is Running in California at a Great Price!

MISAC, a nonprofit group of IT pros who work in support roles for cities throughout California, have hired me to do my in-depth three-day Server 2012/2012R2 class in three cities in California. The class normally runs $1600 per student, but they're offering it to their members for $799/student. Now, I've unfortunately been too busy to put together a public seminar calendar for 2014 yet -- apologies -- so I asked them if they'd be interested in opening their enrollment to the public at large, and they kindly agreed. They're offering seats for non-MISAC members for $999, a $601 discount. The first class runs next Tuesday-Thursday (25-27 February 2014) in Petaluma, followed by a session in March at Diamond Bar (25-27 March 2014) and then in April in Encinitas (22-24 April 2014). Anyone's welcome, and you'd register with MISAC on their Web site, not me. Find out more here: http://www.misac.org/

Tech Section

Note:  when I first wrote this article, I was under the mistaken impression that scripted installs of Vista would automatically get online and activate themselves.  That would have been sort of bad from an experimentation point of view, as that would mean that following this article would waste a product activation!  Reader Thomas Cox, however, wrote to me with the answer:  the installation script setting that tells Vista not to automatically do a product activation.  Many thanks, Thomas!

Thomas' insight caused me to change two things about this article.  First, I previously told readers to be careful not to attach their test Vista PCs or virtual machines to the Internet for fear of an involuntary activation; that advice no longer applies.  Second, I've added the steps to show you how to create your own installation script that does not automatically do a product activation.

Installing Vista Hands-Off With an Answer File

Want to see how to get Vista onto a computer quickly, easily, and with the least interaction on your part as possible?  Once mastered, the technique is quite useful.  In this newsletter, we'll start off by seeing an unattended install in action, then we'll see how to create the crucial ingredient in this sort of installation — an "answer file."

One of Vista's several options for deployment is a "scripted" install.  In this scenario, you give a machine a Vista product DVD and a script for unattended installs called an "answer file," start up the machine, walk away, and return in about 20-30 minutes to find an installed and configured copy of Vista.  In this article we'll cover every aspect of that, but the ugliest part of the whole process is creating that answer file, so we'll skip that at first and go straight to seeing an already-built answer file in action, then we'll return for a detailed explanation of how to create an answer file of your own.

To do a scripted install, you'll need

  • A Vista-capable machine whose hard disk you can wipe clean, or a system running VMWare Workstation (I'm running version 5.5.3; I can't guarantee that these step-by-step instructions will work on any other version)
  • A Vista installation DVD
  • A Vista product key that works with the software on on that DVD (remember, not every product key works with every Vista DVD — OEM versions, retail versions and volume license versions of the install bits are a trifle different, so you couldn't install Vista with, say, the combination of a retail DVD and an OEM product key)
  • A computer running the Windows Automated Installation Kit (WAIK), as described in the previous newsletter

You can set up a computer — the "target" computer in deployment lingo — to install Vista unattended with just a few steps.

  1. Create an answer file.  It's an ASCII text file that you'll usually create using a free program from Microsoft called the Windows System Image Manager (WSIM) that is part of the WAIK.
  2. Give that answer file the name "autounattend.xml."
  3. Put the file on any removable storage device on the target computer; on different machines I've successfully stored the file on a
    • CD-ROM disc
    • floppy disk
    • USB memory stick
  4. Put the Vista installation DVD in the target computer's DVD drive.
  5. Turn the computer on and tell it to boot from the DVD, then walk away.  In about a half hour, Vista's installed.

Download a Basic Autounattend.xml

Assuming that you've got that PC or virtual machine, a Vista install DVD and a product key handy, you're just missing a working autounattend.xml file.  You'll see how to build one of your own later on in this article, but, again, building your first autounattend.xml is a lengthy process, so let's just start out by cheating a bit.  Download one I've pre-built for you from www.minasi.com/vista/autounattend.xml — the easiest way is to just right-click that hyperlink, choose "Save target as..." and save it somewhere on your hard disk.  For the purposes of this article, I'll assume that you've put it in a folder called c:\vista, and so its complete file specification is c:\vista\autounattend.xml. 

Using Notepad, open the autounattend.xml that you just downloaded.  It's an ASCII file of type "XML."  Vista uses XML to store lots of things, and answer files are one of those things.  (In fact, the more I work with XP's replacement, the more I wonder why they didn't just call the thing "Windows XML."  It wouldn't be any more confusing a name than "Windows XP," and would have an extra letter, which has to be a good thing as far as the marketing people are concerned.) 

Insert Your Product Key in the Autounattend.xml

In Notepad, search for the phrase "INSERTPRODUCTKEYHERE" and replace it with your Vista product key.  Type it with the hyphens in place, but case doesn't matter, as in "abcde-fghi-klmno-12345-uvwxy" and no, that key won't work, sadly.  Save the file.  But be sure to read the...

Important Note About This Install

Before going further we should note something:

This install will wipe the boot hard disk clean:  this does a clean install on the target machine, not an upgrade, so don't run this on a system whose first hard drive has any data on it that you care about.  If that's not acceptable, then if you have VMWare then I'll provide instructions to build a Vista VM unattended later on in this article. 

Put the Vista Installation DVD in the DVD Drive

Time to pop the Vista DVD into whatever DVD drive you boot from.  But don't boot the system yet, one more thing to do...

Put the Autounattend.xml File on a Removable Drive

Copy the autounattend.xml to some sort of removable storage and attach that storage to the target system.  But how?  Here are a few approaches.

  • First, you can copy the file to a USB stick and insert the USB stick into a USB slot.
  • If your system has a second CD-ROM/DVD drive, you can burn a CD containing just the autounattend.xml file and put that CD into the second CD-ROM/DVD drive.
  • If your system has a floppy disk drive, just copy the autounattend.xml drive to a floppy and put it in the floppy drive.

Boot Your Computer From the DVD Drive

Finally, we're ready to start our unattended install.  Turn your computer on, tell it to boot from the drive containing the Vista DVD, be sure to stick around long enough to press a key when it asks you to "press a key to boot from the CD/DVD," and your work is done.  Walk away, return in about 20-30 minutes, and you'll find that you've got a system running with a user already built named "Mark" with a password of "swordfish."  It's a member of the Users and the Administrators groups.

Creating An Unattended Install with a VMWare 5.5.3 Virtual Machine

If you don't have a computer whose hard disk you're willing to wipe, then you can try out an unattended install with a virtual machine.  Here's how I did it with a VMWare 5.5.3 VM.  (I don't use Virtual PC, so my apologies but I can't offer step-by-step advice for VPC, but I would imagine that it's about the same.)  My approach will be almost identical to what you just did; create a VM of type "Microsoft Windows Vista (Experimental)."  Take all of the defaults for that machine type and you'll be almost ready to go.

But now we need a removable drive.   What sort of removable drive could we use on a VM?  I have had no luck with making Vista VMs able to read USB devices, so we'll just have to read the autounattend.xml from a CD drive.  We'll need to use the first virtual CD/DVD drive that the VM already has for the Vista Install DVD, so doing an unattended installation will require that we add a second virtual CD-ROM to the VM so we've got a drive that can hold our autounattend.xml CD. 

Before we do that, though, let's create the disc with the autounattend.xml on it, or, rather, an ISO of a CD containing that autounattend.xml file.  We'll then point the the second virtual CD drive at that ISO file.  The easiest way to create an ISO of just one file is with the OSCDIMG.EXE program that we met in the previous newsletter.  OSCDIMG.EXE comes in the WAIK, so just go to the machine that you installed the WAIK on last time and fire up a "Windows PE Command Prompt" as you did before.  Then create a folder somewhere, copy the autounattend.xml to that folder and tell OSCDIMG to create an ISO out of that folder's contents.  More specifically, if you've already copied autounattend.xml to c:\vista on the WAIK computer as I suggested before, then type these commands from the command prompt you just started:

cd \vista
md isotemp
copy autounattend.xml isotemp
oscdimg -n isotemp script.iso

Those commands created a folder called "isotemp," copied the install script to it, and then used oscdimg to create an ISO called "script.iso."  The -n was necessary because "autounattend.xml" is a longer file name than the default 8.3 format supported by ISOs.  Now we've got a file c:\vista\script.iso that contains our script; now we just need a second drive, which will read that script.

In VMWare, click VM / Settings... and Add..., then Next and choose "DVD/CD-ROM Drive."  Click Next and, where it asks you whether to use a physical drive or ISO image, choose "Use ISO image" and click Next.  In the field labeled "ISO image," enter c:\vista\script.iso and then Advanced, then under "Virtual device node," choose IDE 1:1.  (If you don't do that, the new CD becomes the boot CD, and the installation won't get started.)  Click Finish, then OK to get out of the Virtual Machine Settings dialog box.  Start your VM and in about a half-hour, you'll have a freshly-built Vista VM.

Building Your Own Autounattend.xml File

I've always found being able to create an unattended installation pretty useful, and if you've ever tried to do an unattended install of an earlier version of Windows, then you've probably noticed Vista's made its unattended installs a bit more flexible than earlier versions of Windows did.  (In case you've never tried it, earlier versions of Windows let you do unattended installs by putting the installation CD in the CD drive and a floppy with the answer file in the floppy drive.  The decreasing prevalence of floppy drives has made script-based unattended installations fairly useless.)

But thus far we've done unattended installs with a pre-built answer file; time to learn how to build answer files of our own! While answer files are text files of the kind easily edited and viewed with Notepad, we'd probably never create them from scratch with Notepad. Instead, we'll use another tool in the WAIK to build it, the Windows System Image Manager (WSIM).

Before we start up WSIM, though, we need to accommodate one of its quirks:  it needs to work from a copy of a large file on the Vista installation DVD, and it needs that file copied onto your hard disk.  You see, WSIM needs to know exactly which version of Vista that it's creating a script to install, because recall that there are, after all, eight versions of Vista.  So go to the machine that you installed WAIK on — again, see the previous newsletter for instructions if you've not already installed the WAIK — and copy a large file named "install.wim" from the Sources folder of the Vista Install DVD onto your computer's hard disk.  (The file's so large because it contains seven of the eight versions of Vista; only Software Assurance customers get Enterprise, which explains the absence of an eighth version.)  Copy install.wim to the c:\vista folder that we've been working with so far and, before you ask, you've got to copy install.wim to your hard disk.  WSIM can't work from an install.wim on a DVD because WSIM needs to take inventory of what's in that install.wim and write that inventory out as a catalog file, and because WSIM needs its catalog files in the same folder as the WIMs that they refer to.  (Yes, it does seem kind of dumb.)  Once install.wim's sitting in c:\vista, then start up WSIM by clicking Start / All Programs / Windows AIK / Windows System Image Manager.  It'll look like figure 1.

Figure 1: initial WSIM screen

That's one confusing UI, isn't it?  Well, we're not going to be messing with any distribution shares (upper left-hand pane), but we will be choosing a particular Windows image (lower left-hand pane), creating and working with an answer file (upper middle pane), and whenever we need to choose a configuration setting, we'll be in the Properties pane (upper right pane).  Start out by opening install.wim — ".wim" files are Windows image files, kind of like Ghost image files — by clicking File / Select Windows Image..., which opens a dialog box where you can navigate to c:\vista\install.wim and click Open.  Again, install.wim contains seven different Vista images, so you'll next see a "Select an Image" dialog like the one in figure 2.

Figure 2: picking an image

Let's try out Windows Vista Business for our example.  Click "Windows Vista BUSINESS" and then OK.  You'll get another dialog box asking if it's okay to create a catalog file; go ahead and click "Yes."  If you're running WAIK on a Vista box, then you'll get a User Account Control (UAC) prompt confirming that you want to create the catalog -- click "Allow" and WSIM will create the catalog file.  Creating the catalog file will take a few minutes.

When WSIM's done cataloging, you'll see the "Windows Image" pane populated with "Windows Vista BUSINESS" and, below that, folders called "Components" and "Packages."  Open the "Components" folder and you'll see something like figure 3.

Figure 3:  first look at "components" in WSIM

Notice that I've resized the "Windows Image" pane.  WSIM is terribly crowded, and you'll soon find that you must frequently resize a pane in order to read it.  Notice the lines with the blue cubes to the left of them; they're called "components."  A component is a group of operating system settings that are related in some manner, and you can control every one of those settings in an answer file.  That's WSIM's main purpose in life — to create answer files.  If you've ever used WSIM's predecessor, Setup Manager, then you can easily see that WSIM offers a lot more scriptability than Setup Manager ever did!

Time to create a new autounattend.xml answer file.  Click File/New Answer File, and your WSIM screen will look like figure 4.

Figure 4: WSIM with a new answer file

You can see the new answer file has seven sections named "windowsPE," "offline Servicing," and so on.  Microsoft's deployment tools are arranged around seven possible stages to deployment that Microsoft calls "passes."  Not every sort of deployment uses each of the seven, but any answer file might in theory need any or all of those passes, hence the seven sections.  A simple installation from a DVD like the one we're doing will only involve three passes:

  • Pass 1, "windowsPE," encompasses the first part of an installation:  where to find the image to install, what drive to install it to, shall Setup repartition the target system's hard disk, what language to run Setup in, and the like.
  • Pass 4, "Specialize," might be called "configuration."  If you want to change the way that System Restore or the DNS client work (to consider just two examples), then you'll end up adding answer file settings in Pass 4.
  • Pass 7, oobeSystem, includes configuration options that you'd normally work with after the first time you boot a system.  If you want Setup to tell Windows to skip the Welcome Center, or to create a new user account, then you'd be working with Pass 7 items.

Now, if you've ever done a Vista install the old-fashioned way — shove the DVD in the drive, boot the Setup program, answer a few questions and wait — then you know that even in its most "attended" mode, Vista's Setup doesn't really require you to tell it much of anything.  Because of that, I found it surprising to find out that even the most minimal autounattend.xml needs the answers to a fairly large number of questions.  Let's first see how to add configuration commands to an answer file by telling Setup what language to use in Setup and in Vista, and then move to more nitty-gritty stuff after we've gotten the basics of WSIM navigation out of the way.  In the Windows Image pane, find the component (the blue cube, recall) labeled "x86_ Microsoft-Windows- International-Core_WinPE..." and right-click it.  You'll see a context menu like the one in figure 5.

Figure 5: viewing the context menu for a component setting

Notice that this context menu shows that choosing this setting would put the setting in the Pass 1 part of the answer file.  (That should come as no surprise, given that it's got WinPE in its name.) Click "Add Setting to Pass 1 windowsPE" and you'll see new things pop up in the the "Answer File" and "Properties" panes, as you see in figure 6.

Figure 6: WSIM with a component setting added

Notice that in the "Answer File" pane, there's a outlined, "wireframe" version of the blue cube and the whole "x86_Microsoft," etc label.  In the "Properties" pane, we've got a bunch of settings that we can fill in — InputLocale, LayeredDriver and so on.  We'll need to fill in InputLocale, SystemLocale, UserLocale, and UILanguage with "en-us," the shortcut code for "US English."  (Fill in a different one if you're more comfortable with a different language, of course.)  There's no drop-down list box or anything like that:  just click on the field to the right of InputLocale and type "en-us" and then do the same thing in the other three fields.  Those settings control how Vista will communicate with us once it's installed.  We have not, however, told Setup what language to use when communicating with us.  Note the plus sign next to the wireframe blue cube; click that and you'll see a sub-component named "SetupUILanguage" with two possible settings, "UILanguage" and "WillShowUI."  In the SetupUILanguage sub-component,  fill the "UILanguage" with, again, "en-us."  Once you've done that, WSIM will look something like Figure 7.

Figure 7:  a sub-component's setting filled in

So far, we've entered five settings in our answer file.  We've got a couple dozen more to do, so rather than drag you through a seemingly interminable series of click and drag instructions, I'll describe the rest of the settings that we'll need in a more compact shorthand form.  As you've seen, a single component like our "x86_Microsoft- Windows etc" component had four settings that we needed to fill in, and a sub-component needed a setting entered. 

Let me re-cast those five settings in a shorter form that looks like this:

  • Component: ...International-Core-WinPE...
    • Pass 1
    • InputLocale = en-us
    • UserLocale = en-us
    • UILanguage = en-us
    • SystemLocale = en-us
    • Subcomponent: SetupUILanguage
      • UILanguage = en-us

Here, I've first identified the component as "...International-Core-WinPE..."  Its full name in WSIM, next to its blue cube, is "x86_Microsoft -Windows- International- Core- WinPE_6.0.6000.16386_neutral."  Why not write all of that out?  Well, it's quite long and a quick look at the components shows that virtually all of them start with "x86_Microsoft-Windows," so permit me to just skip that prefix.  Just assume that the component's name starts with "x86_Microsoft-Windows," unless I specify otherwise.  I also did not write out the complete part of the rest of the component name, International-Core-WinPE_6.0.6000.16386_neutral, because there wasn't any need to: "...International-Core-WinPE..." identifies the component sufficiently because there aren't any other components with those words in them.

Below the component, I then say what pass to insert the component into on the answer file, and that's important, because while so far we've only seen a component that can only go in one pass, some components give you a choice of more than one pass in which to enter them.  Then I list the settings and the values that you should enter.  Some will be empty text fields, as we've seen so far, or they can sometimes be single-selection drop-down list boxes.  After the last setting in a component, I then list any relevant sub-components, and their settings.

Armed with this shorthand, let's move next to telling Vista how to set up the hard disk:

  • Component: ...Setup_6.0.6000.../DiskConfiguration/Disk
    • Pass 1
    • DiskID = 0
    • WillWipeDisk = true

For this pair of settings we don't insert the entire x86_Microsoft- Windows- Setup_ 6.0.6000.16386_neutral component, but rather we drill down to its sub-sub-component DiskConfiguration/Disk in the Windows Image pane on the left-hand side of the WSIM window, right-click it and add it to Pass 1.  We've got to tell Setup which disk we want it to work on, and that's what DiskID = 0 means.  0 refers to the first hard disk, 1 to the second and so on.  WillWipeDisk = true means, as you've probably guessed, that we want Setup to wipe out any existing partitions on that disk.

Now that the disk's wiped clean, we need to tell Vista to create a new partition.  We'll drill down even further for this one, adding two components:

  • Component: ...Setup_6.0.6000.../DiskConfiguration/Disk/CreatePartitions/CreatePartition
    • Pass 1
    • Extend = true
    • Order = 1
    • Type = Primary
  • Component: ...Setup_6.0.6000.../DiskConfiguration/Disk/ModifyPartitions/ModifyPartition
    • Pass 1
    • Active = true
    • Format = NTFS
    • Order = 1
    • PartitionID = 1
    • Letter = C

Creating a partition involves two sub-components (or perhaps I should say sub-sub-sub-sub-components), CreatePartition and ModifyPartition.  As with Disk, you must open up the blue cubes in the Windows Image pane, drilling down to ...DiskConfiguration/Disk/CreatePartitions/CreatePartition, right click that and add it to Pass 1. 

Once you do that, then the Extend, Order and Type settings will appear in the Properties field.  Type = Primary probably needs no explanation, but the other two might not be as obvious.  "Order = 1" says to Vista, "Just in case I ask you to create more than one partition in this answer file, I want to keep things clear by telling you that I want you create this one first."   It's kind of goofy for us to have to tell Vista that when clearly there will be only one partition on this drive, but hey, that's how Setup likes it:  nice and explicit.  This might be of value if you wanted to create a setup script for a BitLocker-ed system, wherein you'd tell Setup to create a 1.5 GB partition and set it active, and then use the rest of the disk for drive C:.  Under a scenario like that, you'd probably create the 1.5 GB partition first (Order = 1), and then the one for C: second (Order = 2).  "Extend = true" says to Setup, "I know there's a Size setting, but I don't want to specify a size for this partition.  Just use whatever space is left on the disk for this partition."  So, for example, to extend the BitLocker-ready system example, you'd create two CreatePartition sections.  In the first, you'd specify Extend = false, Order = 1, Type = Primary, and Size = 1500, as Size expects its values in megabytes and no, I didn't have to just magically know that; believe it or not, the Help on WSIM is helpful!  In the second, you'd specify Extend = true, Order = 1, Type = Primary, and no Size parameter at all.

Once the partition's created, you can specify its other characteristics with ModifyPartition.  Active = true just marks it as the bootable partition, Order = 1 because just as with the CreatePartition portion, Setup wants to know in what order to modify partitions, even if there's just one to modify, and PartitionID gives the partition a number.  As has been the case with Microsoft disks since the dawn of time, disks are numbered from zero but partitions are numbered from one, which is why the DiskID = 0 earlier on and PartitionID = 1 now.  Format = NTFS and Letter = C should be obvious.  Next, it's time to tell Setup where to install the OS.  (No, it's not smart enough to notice that there's just one hard disk.)

  • Component: ...Setup_6.0.6000.../ImageInstall / OSImage/ InstallTo
    • Pass 1
    • DiskID = 0
    • PartitionID = 1

In the earlier part about configuring the disk, we said to create a partition number 1 on disk number 0.  This closes the loop and tells Setup to put Vista on the partition on that drive.  Then we've got to give Setup our product key and accept the EULA.

  • Component: ...Setup_6.0.6000.../UserData
    • Pass 1
    • AcceptEula = true
    • FullName = <your name>
    • Organization = <your organization>
    • Subcomponent: ProductKey
      • Key = <your product key>

As before, type in the product key using either uppercase or lowercase, but be sure to include the hyphens.  Do not surround the product key with quotes.  Time for a bit more personalization with the next component:

  • Component: ...Shell-Setup...
    • Pass 4
    • ComputerName = <whatever name you want the system to have, or * for random>
    • TimeZone = <your time zone>

The main reason that you need to include this component is to keep Vista from bugging you for a machine name and a time zone.  I'll specify "Eastern Standard Time" because I live there, but you can specify any other that you like.  The phrase "Eastern Standard Time" or any other time zone name, however, must match a list of time zone names built into Vista exactly, or Setup will ignore it.  You can get a list of the exact time zone names by clicking in the TimeZone setting field in WSIM, and pressing F1.  The resulting Help will contain the list of time zone names.  Notice also that there's a ProductKey field here, but you needn't fill it in; Vista won't bug you to re-enter it.  For example, I entered

  • Component: ...Shell-Setup...
    • Pass 4
    • ComputerName = *
    • TimeZone = Eastern Standard Time

And speaking of Vista bugging you, let's keep it from requiring us to create a local user account by telling our answer file to do it:

  • Component: ...Shell-Setup.../UserAccounts/LocalAccounts/LocalAccount
    • Pass 7
    • Description = <whatever description you want>
    • DisplayName = <user account display name>
    • Group = <group1>;<group2>;<group3>...
    • Subcomponent: Password
      • Value = <user's password>

Most of this is self-explanatory except for the Group = value.  You tell Vista what groups to put the new user into by listing them one at a time with a semicolon at the end of each.  For example, I could create an administrator named "Mark" who was a member of Users, Administrators and Power Users like so:

  • Component: ...Shell-Setup.../UserAccounts/LocalAccounts/LocalAccount
    • Pass 7
    • Description = Admin extraordinaire
    • DisplayName = Mark Minasi
    • Group = administrators;users;power users
    • Name = Mark
    • Subcomponent: Password
      • Value = swordfish

Then we can minimize the screen clutter that Vista annoys us with the first time that we log on by customizing what Microsoft calls the "oobe," the "out of the box experience:"

  • Component: ...Shell-Setup.../OOBE
    • Pass 7
    • HideEulaPage = true
    • NetworkLocation = Work
    • ProtectYourPC = 1
    • SkipUserOOBE = true

Those settings tell Vista that the network that it first finds itself on is a "Work" type network, so it can loosen the firewall settings just a trifle from what it would set if it were an "Other," or "Public" network.  The "ProtectYourPC" setting of 1 means to install updates automatically, and SkipUserOOBE tells Vista not to show the Welcome Center.

Finally, let's tell Vista not to activate itself automatically — this is a test machine, after all, and we don't want to burn a product activation!

  • Component: ...Security-Licensing-SLC-UX...
    • Pass 4
    • SkipAutoActivation = true

Be sure to look closely at the component name, as there are three different components with "Security-Licensing" in their names.  The one we want has "UX" in its name; the other two don't.  Once you've got all of your settings in place, click File/Save Answer File and name it autounattend.xml.  Mine looks like this:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-us</UILanguage>
</SetupUILanguage>
<InputLocale>en-us</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UserLocale>en-us</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Extend>true</Extend>
<Order>1</Order>
<Type>Primary</Type>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Letter>C</Letter>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<Key>INSERTPRODUCTKEYHERE</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Mark Minasi</FullName>
<Organization>MR&amp;D</Organization>
</UserData>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>*</ComputerName>
<TimeZone>Eastern Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Security-Licensing-SLC-UX"
processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>cwB3AG8AcgBkAGYAaQBzAGgAUABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
<Description>test user</Description>
<DisplayName>Mark Minasi</DisplayName>
<Group>administrators;users</Group>
<Name>Mark</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/mystuff/install.wim#Windows Vista BUSINESS"
xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Of course, what we've done here is just the start.  To get good at this, I'd suggest making this basic answer file work and then start enhancing it.  For example, when I create Vista images for class, I create a pretty simple setup, but then I need a few things done, so I needed a script that would

  • Create a directory on my new Vista image named c:\mystuff
  • Copy my sample applications from the \apps folder on the CD (an ISO, actually) that I use to hold the autounattend.xml file to c:\mystuff
  • Copy some photographs from that CD's \pics folder to the Pictures folder in the profile for the Mark account
  • Copy the install.wim from the installation DVD's \sources folder to c:\mystuff

Pre-Vista, I got to monkey with something called cmdlines.txt... ugh.   With WSIM, it was simplicity itself.  Just load up an answer file and right-click "Components" in the "Answer File" pane.  Choose "Insert Synchronous Command to Pass 7 oobeSystem...," and you'll get a dialog box that allows you to punch in any command-line command that you'd like.  You can enter as many commands as you like, and you can tell WSIM what order to execute them in.  But one thing to remember:  the "internal" commands, the commands that are built into the cmd.exe command processor, like copy, erase, and the like cannot be directly entered into the dialog box.  For example, suppose I were to enter

md c:\mystuff

That is, as you probably know, the command that would create the "mystuff" folder.  The command wouldn't work here, though, because there is no md.exe command; instead, md is a subcommand of the cmd.exe executable, which lives in the c:\windows\system32 folder.  To make it work, I must prefix the command like this:

c:\windows\system32\cmd /c md c:\mystuff

Just prefix any of your internal commands with "c:\windows\system32\cmd /c" and they'll work just fine.  Happy scripting!

Bring Mark to your site to teach

I'm keeping busy doing Vista seminars and writing, but I've still got time to visit your firm.  In just two days, I'll make your current NT techies into Vista, security, XP, Active Directory or 2003 experts.  (And better yet they won't have to sit through any Redmondian propaganda.)  To join the large educational, pharmaceutical, agricultural, aerospace, utility, banking, government, telecommunication, law enforcement, publishing, transportation, military and other organizations that I've assisted, either take a peek at the course outlines at www.minasi.com/presentations.htm, mail our assistant Jean Snead at Assistant@Minasi.com, or call her at (757) 426-1431 (only between noon-5 Eastern time, weekdays, please).

Until Next Month...

Have a quiet and safe month. 

Please share this newsletter; I hope that it is a useful source of NT/2000/2003/XP information.  Please forward it to any associates who might find it helpful, and accept my thanks.  We are now at over 40,000 subscribers and I hope to use this to get information to every single Mastering 2003, XP, NT and 2000 Server reader. Thanks for letting me visit with you, and take care.  Many, many thanks to the readers who have mailed me to offer suggestions, errata, and those kind reviews.  As always, I'm at http://www.minasi.com/gethelp and please join us at the Forum with technical questions at www.minasi.com/forum

To subscribe, visit http://www.minasi.com/nwsreg.htm. To change e-mail or other info, link to http://www.minasi.com/edit-newsletter-record.htm.  To unsubscribe, link to http://www.minasi.com/unsubs.htm. Visit the Archives at http://www.minasi.com/archive.htm. Please do not reply to this mail; for comments, please link to http://www.minasi.com/gethelp.

All contents copyright 2007 Mark Minasi. You are encouraged to quote this material, SO LONG as you include this entire document; thanks.