BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 8d, 19h, 53m | CPU: 51% | MEM: 2828MB of 8191MB used
{The community for beta collectors}

Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPost subject: [WIN7] Unattended Deployment Guide.        Posted: Wed Apr 13, 2011 11:10 am 
Reply with quote
User avatar

Wed Apr 13, 2011 9:46 am

Note: I've posted this around a few forums over the past couple of months and a lot of people found it handy. Not sure if many people on these forums will, but hell for my first post may as well make it something useful! Hope some people enjoy it.


Lately I've been playing around with a custom Windows 7 install, and a month before, I was able to make an unattended windows 7 DVD including
useful apps, device drivers, a lot of registry tweaks, brandings which was completely unattended, however I also realised that there were not many good guides out on the Internet. I therefore decided to post this guide to gather some feed back to see what people thought! Sorry if some does not make sense it is my first tutorial! Please provide feedback as I want to improve this guide as I go to make it one of the finest on the Internet.

I'm posting the proceedings here just in text format, without any screenshots or attachments, if someone becomes interested, I'll post them later.

What We Need:
A) an untouched windows 7 DVD
B) WAIK for windows 7 : Windows AIK and .NET Framework 4 from Here
C) VMware or VirtualBox for testing (optional, the entire tutorial can be done on a physical PC but I recommend a Virtual PC easy to revert if you make a mistake)
D) any burning software ( I recommend ImgBurn available at )
E) pe explorer: PE Explorer (Only needed if you want to do branding, however this can be done via RT Seven Lite or 7Customizer)
F) If further customisation is needed you can use either one of the following programs. RT Seven Lite available Here. Also available here
7Cuztomiser - available Here both have huge amounts of support available at the MSFN Forums.


NOTE: If using a physical machine install Windows 7 normally and skip to step F

A. Install any virtual machine, I strongly recommend using VMware as mounting a partition in VMware is very easy compared to other virtual machine software. However any software will do which will enable you to either mount the virtual HDD or have network connection. For this guide unless otherwise mentioned we will presume that you are using VMware.

B. For VMware, install it, run it, from the menu select create new virtual machine.

C. When creating the virtual machine I recommended the following options:
• Typical
• I will install the operating system later (this means it does not interrupt our installation process by attempting to automate the situation
• Select Windows and then for version Windows 7 or Windows 7 x64 depending on the version of Windows that you are creating a custom version of
• Name your Virtual machine if you want
• 60GB is a good choice for a HDD size but it does depend on how many programs you wish to include in the image. Store it in a single file unless you wish to move the HDDs around
• Sticking with the normal hardware usually works fine. HOWEVER if you know what you are doing and the limitation of your computer hardware it is worth while putting the settings higher so make it faster.

D. Now that the machine is created it is time to get it booting of your Windows 7 disc or img
• Select the machine out of the favourites on the side
• Double click on the DVD drive out of the devices list
• Either select the ISO file or if the disc is in a physical drive select it

E. Now we can boot the machine! Select power on and the computer should begin booting into a normal Windows 7 installation, if the Virtual machine does not boot of the CD, hit delete while the Virtual Machine is still in the BIOS and select the DVD drive to force boot it of it

F. Once the Windows Installation has begun continue on with a normal installation. After the install has restarted for the first time and you have choices for personal setup press the following key combination CTRL+SHIFT+F3. This will cause the machine to reboot and it will begin to boot into Audit mode, you should see a window open called Sysprep once it is logged on. Leave this open and minimise it for now.

G. Install your necessary applications, reboot if necessary, apply registry tweaks, note that registry keys under the value "HKEY_CURRENT_USER" won't work, you have to run them via setupcomplete.cmd, or add them to the DEFAULT USER HIVE. I will explain more about this later in the guide. This is also the best time to fully update your Windows Install. All updates will then be added to the WIM, NOTE haven't checked if this also includes SP1 will update the guide once I have spare time to check this out.

ADVANCED NOTE: If you wish to keep your WIM small and applying times short. What you can do rather than installing all of your software and then recapturing the WIM is install the software on first logon. This has its advantages and disadvantages. 1 it means applying the WIM takes less time. However you have to make sure that all your software is somehow unattendable during the install or you will have to have someone sitting infront of the computer tapping along the installs with defeats the purpose of having a unattended install. Alot of software have silent switches included within their installs a awesome site to look that soft've stuff up is located here or a handy little scirpt that a user on MSFN created that looks for switches within installs, find it here.

NOTE: Due to the way Sysprep works anything in the TEMP, Appdata folders etc will be deleted. This means programs like Google Chrome will not stay installed after sysprep due to the fact that it gets installed within APPDATA. Programs like these can be installed post install, I will explain how later. Also any short cuts that are not in the All Users folder, or Public user folder, will not be on the desktop post install, they can be copied to the all users directory.

IMPORTANT NOTE: Once again due to the way sysprep works it clears all drivers from the system, this means that any third party drivers that are needed for programs, for example Daemon Tools, will be cleared. This causes errors during reinstallation using your custom WIM as it can't find the drivers needed to complete the install. For your installation to work you will need to make sure you do not install any programs that fit this criteria. Programs like these can be installed post install. Please post a comment if you find a program that cannot be installed as I hope to get a list together for people to look at to find what programs work and don't.

H. On the sysprep window select Enter system out of box experience, MAKE SURE YOU SELECT THE GENERLIZE OPITION, select shutdown and then run sysprep. Once ran the computer should shutdown. We can now pull back our WIM for redeployment!

NOTE: The above mentioned sysprep settings are very basic. If you wish to incorporate a unattended.xml you will need to run the sysprep through command prompt. I will explain later in the guide about the advantages about incorporating an autounattended.xml

I. The reason that I suggest using VMware is that it gives you the option for v2p (virtual to physical) feature, during the pullback period it is it is hugely helpful. To mount the drive, go through the following steps
• Double click the HDD in the devices menu under the virtual machine
• Click the utilities button and hit map
• Choose the largest Volume as this is most likely the system disc. Remember the drive letter.

NOTE: If you are using a Physical PC then you will need to create a WinPE boot. Boot onto that then use imagex from that and write the image file to a different disc, you can use all of the commands below the same for capturing the WIm however. I will explain how to create a WinPE boot later in the guide.

I. Click start-windows aik tools command prompt type
imagex /compress maximum /check /verify /flags "Ultimate" /capture z: C:\W7\install.wim "Windows 7 Ultimate" "Windows 7 Ultimate x86"

I’ll now explain each command

• /compress is the compression ratio of the WIM. I always recommend maximum as you save the most space and it adds on next to zero reapplying time.
• /check and /verify are just for verification uses to make sure that there are no errors in the capture, I recommend always using these.

• /flags are the flags to show which type of Windows is on the disc

• /capture is the main command telling imagex to make a WIM out of the Z: drive. Change Z: to whatever drive letter you chose to mount your HDD too. Or if on a physical PC the drive that you plan on capturing.

• C:\W7\install.wim tells imagex were to save the WIM and the name and note for the WIM in the following two parts
• Each command is better explained within the help file of the WAIK

J. Now you have a WIM file as C:\W7\install.wim extract the Windows 7 CD to a folder, should be able to do this using WinRAR or a program similar else you can always mount the CD and copy the files directly to a folder, the second method also works for a physical copy. I will presume that the folder is C:\W7DISC\. Now copy your custom WIM from C:\W7\install.wim and replace it with the one C:\W7DISK\sources\install.wim with this one, your disk is now nearly completed!

H. Now that your WIM is created. You can now create your new Windows 7 DVD. Create a DVD using the following command in the deployment tools command prompt (found in the start menu)

oscdimg -u2 -m –o –h –bC:\W7\DVD\boot\  -l”YourDVDLable” C:\W7\DVD C:\W7DISK\Windows7.iso

I. Once that command has completed your ISO is complete! You can now install Windows from a DVD burnt from that ISO using any burning software, ImgBurn is reccomended, and once installation has completed all your programs should be there that you installed during audit mode.

NOTE: If you wish to go use more complicated options please continue reading! I recommend attempting to increase your knowledge! Other things that I am going to cover as you continue reading are: Creating an autounattended.xml, installing software on first logon, making your installation COMPLETELY automated, creating a custom installation method.

Adding Service Pack 1 to a Windows 7 image without having to go through Audit Mode. (Any update actually as long as you have the Windows Update file.

1. Download and install RT7Lite, links found at top of post.
2. Once installed run the program and find your image using browse on the first menu and select where you want to extract the image.
3. Once RT7Lite has finished extracting the WIM a prompt should come up asking you to select which version of Windows7 the WIm is, select your version and also down the bottom you can select the tick box for imtegrating Service Pack 1!
4. You should now be prompted for the integration of the Service pack. Select your Service pack using the browse button. Service packs can be downloaded here.
5. You can then click start and wait for the pack to finish integrating and you can then click exit.
6. Once this is done click on the tasks tab if it doesn't automatically appear for you.
7. If that is all you want to integrate using RT7Lite then on then next all you need to select is ISO Bootable.
8. Now click along to the ISO Bootable tab and in the top right corner of the drop down list select how you want to prepare for the image.
9. If you wish to burn directly to a DVD then select Direct Burn, and then select which DVD drive etc you want on the rest of the window, or if you want to create a ISO for later select create image.
10. Once you have finished with all your options press the Create Image button.

You are now done congratulations!!!

Adding registry settings to the default user profile

NOTE : The commands below presume that you have already captured your WIM and run sysprep, it is possible to load registry setting in Audit mode but I reccomend against doing that as sysprep may break some of the settings, I always reccomend loading it AFTER sysprep and capturing the WIM

1. Mount the WIM file. Using the following command.
 dism.exe /Mount-Wim /WimFile:C:\locationofWIMfile /index:1 /MountDir:"C:\Whereyouwanttomount"

So if you have followed the previous steps it should be something along these lines. Make sure you run it in the developers command prompt.
dism.exe /Mount-Wim /WimFile:C:\W7\install.wim /index:1 /MountDir:"C:\W7\MOUNT\

2. Mount the default user hive through regedit. This can be done through the following. Run regedit.exe
3. Press file. Load Hive. Then browse to "c:\w7\mount\users\default\NTUSER.dat", presuming that you mounted your WIM. Leave a name for the HIVE
4. You can now add any settings to the default user HIVE. By browsing to that KEY and adding files manually.
5. Now once that is done you have to unload the HIVE. Go File -> Unload Hive.
6. Now we need to unmount the WIM. Close anything that is going to be accessing the files in the WIM. Including the register hive. If you do not do this you will break the WIM. Once everything is closed run the following command in the developers command prompt.
dism.exe /Unmount-wim /MountDir:C:\whereeveryoumounted /commit

Presuming you used the previous commands it should look something like this.
dism.exe /Unmount-wim /MountDir:C:\w7\mount\ /commit

7. You have now added default registy settings :)

NOTE: If you did something you don't want to commit in the WIM you can also you /discard to destroy all the changes and preserve your WIM.

You can add plenty of options in the default registry hive. Options can be shown in 7Customizer


1. Download and install winintegrator (it requires .net framework 4 to be installed).

2. Run winintegrator; select your location of windows 7 media such as D:\w7.

3. You can integrate drivers (can be downloaded from; remove unnecessary packages via winintegrator (but once you have finished removing packages these can never be added again without building the WIM again from scratch).
NOTE: I recommended against adding drivers into a WIM. In my view it limits you to how you want to deploy the package. I always recommended just using Windows default and then updating the drivers separately through each machine. Although this method is not suited for huge deployment for networks it is suited for personal use.

CREATING A autounattended.xml

In this part of the tutorial I will teach you how to create an autounattended.xml. An autounattended is an xml file that has numerous amounts of settings that you can pass to a Windows Installation to automate the process. Using an autounattended.xml you can completely automate the process of installing windows. You can change the username, computer name, time zone etc etc. Within the .xml you also have the ability to set the default location for My Documents and other options.

You have two choices of how to use an autounattended.xml. You can either: Push it through during your sysprep, or leave it on the root of a drive whilst you boot into your Windows installation and the windows setup will read the .xml and incorporate it into the deployment AS long as the Windows setup can see the drive. I prefer pushing it through during the sysprep phase. This means that I can have a completely Windows independent installation and use my own custom GUI to customise settings. First I will show you an example of an autounattended file.

Due to the length of the file I will be hosting it here. For creating your own .XML I recommended using Windows System Image Manager (WSIM) (should be installed with the WAIK, shortcut in the start menu) if you wish to have all of the options available to you that a .xml has to offer, however if you do not need all of the settings of the .xml and only want a simple headless operation I would recommend creating a .xml through either 7Cuztomiser of RT Seven Lite.

The first group of code includes the Windows GUI during installation settings and the time zone as well as who the computer will be registered too. I.E. Organisation and the user. The Product key is also in this section. In the XML I have provided it is just the default product key for Windows 7 Ultimate.
The next group of settings include: Making the default admin, giving the admin a password, hiding the EULA, setting the network type, setting the windows update settings, hiding the connect to wireless option.
The final option right down the bottom are the automatic logon settings. I have the automatic logon settings on due to the fact that I like to install software during first logon. This however is not needed if you do not wish to have a computer logged on straight after install.

Once your autounattended.xml has been created it is as easy to include it within an install. If you wish to still use the Windows GUI during install just dump it on the root of your installation drive or any drive that is going to be plugged in during your installation.

If you wish to use the autounattended file through sysprep and push it into the actual WIM it is a touch more complicated.
1. We need to learn the command prompt for sysprep. Open up a cmd window and type in the following command

“C:\Windows\System32\sysprep\sysprep.exe” /generalize /oobe /shutdown /unattend::”PATH OF UNATTEND FILE”

NOTE: I recommend putting the unattended file in C:\Windows\Panther because the file doesn’t move from here after sysprep meaning that it is easier to edit if you want after applying the WIM.

2. That command will push the unattended file into the setup and mean that you should not have to do anything depending on the settings you included within the file. However this means that you cannot edit the install without editing the unattend.xml file once the WIM has been applied to the computer. This can be done with a custom GUI during the application of the WIM. However it does mean you have to find the .xml file as sysprep moves it to a safe location during sysprep. I find that if you place the unattended.xml in C:\Windows\Panther sysprep does not move.

3. Now your image is syspreped pull it back like we did before during a normal WIM customisation.

4. You can now follow the rest of the instructions like normal during an installation unless you feel the need to have a completely automated installation without the Microsoft GUI, if so keep reading.

Creating a custom WIM boot.

I presume you are an advanced user for the rest of the guide
To create a custom boot WIM I recommend using the following guide
There is also great amount of help within the Windows AIK help file.
Now that you have creating your custom boot WIM make sure you add imagex into the WIM file. It is located in “C:\Program Files\Windows AIK\Tools\x86”. Once you add that file you can apply a WIM file onto a disc by doing using the following command.

Imagex.exe /apply “PATH OF THE WIM FILE” 1 “PATH YOU WANT TO APPLY THE WIM TO” /verify

You can find which disk is which via using diskpart. Make sure your CMD path is in the same directory as imagex.exe. This will now mean you are applying a WIM file! This is excellent as it means that using a method like this you can apply your own custom WIMs without using Microsoft’s GUI.

Note: If you wish to use this method for applying WIMs you will have to create your own boot partition and apply the relevant files. To do this when formatting the drive leave a 200meg partition at the front and mark it active and make sure that it is a primary disk. You will then need to have a copy of the file bcdboot.exe on the WinPE boot CD or USB, this file is located in “C:\Windows\system32” on a normal windows install. Once you have this use the following command in the same directory as bcdboot.exe:

bcdboot.exe x:\Windows /s Z: . Replace x:\

with the drive letter that you wish to apply the WIM too and replace z:\ with the drive letter that you wish to have the boot partition listed as. END NOTE

To then edit the autounattended.xml file during each installation you can simply either open up the .xml file wherever you placed it in notepad and edit the file once the custom WIM file has been applied BUT BEFORE THE WIM HAS GONE THROUGH SYSPREP and editing it with your own information or create a GUI through scripting like AutoIT that can edit it for you using information you give it. The AutoIT forums have plenty of help available for GUI creation.

NOTE: If you wish to install software on first logon you can add a registry entry into the ntuser.dat file (Previously mentioned as the default users registry hive) that will run software on first logon. If this is too complicated you can of course just leave a shortcut in the startup folder for the default user to run an .exe ;). The easiest way to run a huge set of installations on first logon is of course going to be using AutoIT. This way even if the program does not support silent installations you can automate the program installation using AutoIT. Else you can just run a heap of MSIs using silent switches.


The scripts that I have created for full Automation of the install are available here in a zip. To read and edit the scripts you will need AutoIT and the Scite editor available on their site here. The First Logon.au3 is the script that I use to install software that I typically can't without sysprep breaking the installs. I usually run this on first login using NTUSER.dat to call upon it through the registry. The other script applying the WIM is one that I use to customise the install of Windows 7 without having to use the Windows GUI, this script was one of the first that I ever created so I apologise if it errors sometimes. This script has huge amounts of customisation and is therefore not aimed at everyone. If you know all of the settings that you want to use like which disk partitioning etc then all you really need is a .bat file to run that applys the WIM partitions and then restarts. Hopefully everyone will find the scripts handy.

Once you have completed all the above steps you should be able to.
1. Create your own custom WIM
2. Apply it using your own custom software
3. Make the install go completely unattended whilst still being able to edit the settings
4. When creating an ISO make sure to use the command previously mentioned!

Final Tips!
• Always read the help files! They are really helpful!
• When mounting and unmounting your WIMs make sure that no programs are open that have anything to do with the files in the mounted folder as it will error during the mounting process!
• Always. Always. Always. READ THE HELP FILES!
• Don’t hesitate to ask for help on forums, people are actually nice!

Thanks for reading the tutorial some links are listed below. I am unsure whether they still exist but I just wanted to get this guide out so I have not checked.
Thanks CalBoy

Useful links:

a) windows aik: Here
b) pe explorer: Here
c) win integrator: Here
d) .net framework 4: Here
e) VMware: Here
f) gimagex: Here
g) necessary driverpacks: Here
h) uxtheme patcher for 7 RTM (you have to use it at audit mode): Here

Top  Profile
 PostPost subject: Re: [WIN7] Unattended Deployment Guide.        Posted: Wed Apr 13, 2011 1:00 pm 
Reply with quote

Wed Apr 13, 2011 12:51 pm


Favourite OS
Wow.... Handy! Thanks for this! Was actually looking for a decent guide... and happened upon this one! thanks for the hard work...!

Top  Profile
 PostPost subject: Re: [WIN7] Unattended Deployment Guide.        Posted: Wed Apr 13, 2011 7:20 pm 
Reply with quote

Thu Mar 04, 2010 12:33 am


Favourite OS
Mac OS 9

1. Download and install winintegrator (it requires .net framework 4 to be installed).

2. Run winintegrator; select your location of windows 7 media such as D:\w7.

3. You can integrate drivers (can be downloaded from; remove unnecessary packages via winintegrator (but once you have finished removing packages these can never be added again without building the WIM again from scratch).
NOTE: I recommended against adding drivers into a WIM. In my view it limits you to how you want to deploy the package. I always recommended just using Windows default and then updating the drivers separately through each machine. Although this method is not suited for huge deployment for networks it is suited for personal use.

This can also be done with dism :)

dism /Image:C:\"path to mounted WIM-image" /Add-Driver /Driver:C:\"path to folder containing drivers" /Recurse

Very good tutorial, hope you make more!

Top  Profile
 PostPost subject: Re: [WIN7] Unattended Deployment Guide.        Posted: Fri Apr 15, 2011 3:28 am 
Reply with quote
FTP Access

Wed Apr 13, 2011 12:29 pm


Favourite OS
Windows 7 / Hackintosh
Very good tutorial there.

Just a few small tidbits I found while doing my windows 7 deployments. Once you create your unattended.xml file and sysprep the machine editing that file is useless. You have to edit the c:\windows\panther\unattend.xml also if you don't write a batch file to delete that it will be left there and if a user should
happen to find it they would have the local user name and pass and maybe a domain join account.

I'll have to add some stuff when i get to work where all my notes are.

Top  Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2017


Sitemap | XML | RSS