Virtualization, Cloud, Infrastructure and all that stuff in-between

My ramblings on the stuff that holds it all together

Category Archives: SYSPREP

Location of Sysprep Files When you Install vCenter on a Windows 2008 Server


If you need to install vCenter 4 on Windows Server 2008 and want to be able to customize non Windows 2008/Vista and later VMs (i.e Windows XP, 2003, 2000) you need to place the extracted files in a different location than you used with Windows 2003 (C:\documents and settings\all users … etc.) so that vCenter has access to the sysprep.exe files.

On Windows 2008 this location is now in C:\ProgramData\VMware\VMware VirtualCenter\sysprep


You can then extract the file to the appropriate folder and use the customization specification functionality (like this ESX 3.5 example)

There is a handy reference with download links for all versions here.

Note – as I posted previously you don’t need to worry about this if you are solely deploying Windows 2008/Vista and later VMs, as they have sysprep.exe built into the default OS build.


More Useful Things You Can Do With ImageX


James O’Neil has a good post here – an example of how he used ImageX to quickly build and maintain his own vista system image with his typical apps.

Also handy for reference as he shows how to split very large images across multiple CDs using the /split switch.

Make Your own Offline Windows Update CD/DVD

What a handy tool; if you download the app you can select which Microsoft OS/Applications you need patches for and it will download them all via the Windows online catalog to a source directory and then compile a script to auto install them all – it will even generate a .ISO file and handle dependencies and reboots – v.handy (and more efficient) if you need to quickly present it to a bunch of virtual machines with no Internet access or are on a site with slow internet access.

Excellent; now as far as I know Microsoft have no mechanism for doing this other than downloading all the patches manually… even with the Vista RTM images I built last week it had nearly 100Mb of OS patches alone!

Screenshot of the available options in the app – download it here here (updated 14th Sept’09)

OS Updates – multi-language too


Office Suite Updates too


You can even get all the patches for everything and it will compile it into a DVD .ISO image – I’ll definitely be using this – hopefully you can use the info it downloads to slipstream update a vista .WIM image – will have to try that in a couple of weeks.

(original link from a post on slashdot)

Problems Restoring a non-SysPrep Vista Image Using DiskPart & ImageX


Goal: keep a single .WIM file, Multiple instances of the same build in the .WIM file

Build001 non-sysprep’d version for maintenence with all latest patches and corp apps

Build002 sysprep but no domain for home workers/3rd party

Build003 sysprep + domain joining and scripted OOBE for corp machines

Build004…etc. tweaks to the sysprep – for different domains/customers or OOBE settings like language etc.

Build a bootable WinPE DVD with ImageX and the large .WIM file stored on it so no network connectivity required to install (at this stage) just a single DVD.

Reboot from Win PE to start Vista MiniSetup/OOBE

I hit a problem as when I restored build001 to my reference machine it wouldn’t boot and immediatley gave a 0xc000000e error

This was because my automated build DVD runs diskpart with a scripted set of commands (WIPEDISK.TXT) which includes the clean command


select disk 0
create partition primary
select partition 1
format fs=ntfs quick
assign letter=c

This caused problems in this instance because The clean command erases the partition table ID.

If an image has not been-sysprep’d it still looks for the original partition table ID (which diskpart removed) hence the stop error at boot.

Sysprep’d images don’t have this problem as the “/generalize” switch resets this dependency on the partition table entries and mini-setup runs at 1st boot to fix it up.

So, if you need to do maintenance on a non-sysprep’d reference image then

    • You need to restore it via imageX and your usual process (in my case a bootable PE DVD)
    • It won’t be able to boot – it will give an 0xc000000e error
    • Boot the reference machine from your original Vista install DVD and choose to repair
    • This puts back the partition table ID and it will boot again
    • Once it’s booted you can carry out any online maintenance, add extra software etc. to customise it
    • Then sysprep /generalize /oobe /shutdown your reference machine
    • Map a drive to your master .WIM file, or a USB disk etc.
    • Append the changes to the master .wim file (remembering to use the /APPEND switch; if you just use /CAPTURE you will OVERWRITE your .wim file and be very sad.. Did it twice before I learnt to backup the .WIM file before hand!
    • Then re-master your DVD – with the appropriate files – I just inject the .WIM file to the Windows PE DVD I made using PowerISO.

Rinse and repeat.

Thanks to this post and this post figured it out…eventually!

Build a Windows Vista Master PC Image


I haven’t had to do this sort of thing for a while and it’s the first time I’ve done it with Vista so here is a list of things I found; mainly for my own memory but hopefully it helps you too.. I only had 24 hours to do this, 50+ new PC’s to deploy to and a lot of other work to do, so I didn’t take the 100% best-practice approach.. but it works.

I wanted to take advantage of the new WIM image format – this is a file based snapshot format that is the default for a new Vista install and allows you to keep several different instances of a Vista installation in the same media. but requires less overall space as it “single-instances” files – for example a traditional Ghost based approach would keep a whole copy of explorer.exe once for every clone; this method just keeps the file once and uses pointers.

My goal is to have the following stored within a single .WIM file; this gives a bit of flexibility as we will be using a variety of these builds – yes it might be a bit more sensible to use a server based software deployment tool like SMS for the apps but we need the ability to support a variety of configurations and off-line/remote use and build for this implementation.

Build001 Base Vista OS and hardware drivers for the HP PCs we will be deploying to with latest windows updates
Build002 As above + Office 2007 Standard VL Version & latest updates
Build003 As above + Misc Apps (Acrobat, Flash, AV Etc.)
Build004 As Above but with an automated, domain joining Sysprep

You’ll Need.

Tip: I found it much easier to try all this out using a virtual machine; rather than having to burn DVD’s just to get the config right – you can do this by mounting the .iso file within a disposable virtual machine and boot from the “virtual” CDROM/DVD.

This implementation is going to rely on the OEM licence’s supplied on PCs – but we need to use our own build rather than the rather stodgy one supplied by HP so we can’t script the product key/activation and the user will need to enter it within the 30-days grace period.

Automated Installation

I spent a while hacking away with autounattend.xml files using System Image Manager without much luck – this site and this site were handy in figuring out how it worked and I managed a working file once I’d changed the disk partitioning bit from this script

Image Based Installation

Word of warning if you get an installation GUI when the machine boots then it’s ignored the autounattend.xml file but it doesn’t tell you why; there is a bug if you store it on a flash drive – fix here and I couldn’t make it work by storing the file in the root of the DVD and had to resort to a virtual floppy in my test build VM – more information here.

In the end I had to abandon the unattended setup because of time constraints, and it didn’t meet all of my needs anyway so I did a manual Vista install (without entering a product key) and then proceeded with the imaging process as I was hoping to get an application-inclusive “build”; with an unattended install I would have had to script all the application installations which would have probably taken too long.

Firstly you need to create a Windows PE bootable CD – info here and here quick version in step 4). just a word of warning, if you cut & paste the OSCDIMG.EXE command line from the site it won’t work and you’ll get an “Error 5 Access is denied.”


Weirdly this is because the  “-” in the command line shown on the web page is the wrong ASCII symbol (assume thats an HTML/browser weirdness) but it will work fine if you type it in manually and you should see the following;


Now, once you’re happy with the reference image and have all the windows updates etc. installed you need to sysprep it to generate a new SID and make it “general”.

Run SYSPREP.EXE and choose OOBE and generalize, then shutdown the reference PC – if you have a sysprep.xml file now is the time to use it.

Now you can boot the Vista “reference” PC from the PE CD and capture the image.

you can keep the image on the same disk as the Vista installation, something you can’t do with Ghost etc.

this is done with the following command;

Imagex.exe /compress fast /capture C: C:\image-name.wim “build001” /verify

When its finished you can copy the resultant .wim file to a removable USB drive or network share (note: PE2.0 seems to support hot-swapping USB flash drives, which is handy – all my previous PEBuilder based CDs would only detect such devices at boot-time.

And you’re done, well you have a master image anyway.. next step would be to apply it to a machine.

Plenty of scope to automate the .WIM image deployment, I want to add it to a PE CD/DVD that the user can boot the machine from, then walk away and have it fully build a machine.

More later.