Hello all
In the first part of my article, I talked about the creation of answer file for Windows 7 unattended installation. In this part, we will finish Windows 7 installation, capture it as an image on a WDS server and install another computer with this captured image in unattended mode.
First thing first, I have to install Windows 7 on an installation computer which we will capture as a base Windows image. For this purpose, I put the Windows 7 DVD to the DVD drive and boot the computer with it. I follow the installation wizard as usual and when it asks me to create a new user (Figure 1), I press the Ctrl+Shift+F3 key combination. This makes the computer reboot and enter into “Audit Mode”.

Figure 1: The screen that we press Ctrl+Shift+F3 key combination
Audit Mode is a type of boot mode which lets OEMs and enterprises customize their Windows installations. As long as this mode is active (unless sysprep /oobe command is run, it stays active), I can do any customization or install any program/driver on the operating system and test all these installations and customizations until get satisfied. The disabled Administrator account is used to logon Windows 7 in Audit Mode (Figure 2).

Figure 2: Audit mode with administrator logon
When the operating system is in Audit Mode, a sysprep GUI is displayed in every boot. I can safely close it by clicking on the top-right cross sign (Figure 3). As I mentioned before, unless I run the sysprep /oobe command, Audit Mode is active.

Figure 3: sysprep screen on audit mode
I finished all the program installations and customize the profile of Administrator account (i.e. proxy settings for IE8, Turkish Language Pack installation for Windows 7 Enterprise, change the wallpaper etc). In our answer file, we have a line <CopyProfile>true</CopyProfile>. This line will cause the administrator profile be copied to the default profile. In Windows XP times, we did the same thing by copying the profile to default user folder via system properties. By the way, Windows 7 Turkish Language Pack is coming with Windows Updates for Enterprise version (Figure 4). Therefore, users can use the operating system in either languages. I prefer to use Turkish.

Figure 4: Language packs for Windows 7 Enterprise Edition
Now, I want to say few words about Office 2010. If you want to activate your Office 2010 product via KMS Host machine in the future, you have to run a command for this purpose. While none of the Office products are running, I open a command prompt with administrative privileges. Under “C:\Program Files\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform” folder, I run the ospprearm.exe command. After thsi command, I have not to run any Office 2010 product on this machine until I will capture the image of this machine. Figure 5 illustrates a rearmed Office 2010 product activation status (of course, this screen capture is taken after the Windows image capturing process).

Figure 5: rearmed Office 2010
There are few things left to do before imaging actually. Now I have to create a folder named Scripts under C:\windows\Setup\ . After that, by using Notepad, I create a file setup.cmd under this folder (Figure 6) and right the following two lines in it :
del /Q /F c:\windows\system32\sysprep\unattend.xml
del /Q /F c:\windows\panther\unattend.xml
I also copy my unattend.xml file under the folder c:\windows\system32\sysprep\ (Figure 7). Why I did all these things by the way? These will cause my answer file be deleted automatically after it is applied. Therefore, product keys, passwords or any private data in my answer file will not be exposed to anyone. I finished all my job so it is time to run the sysprep command now.

Figure 6: setup.cmd file

Figure 7: unattend.xml file
I open a command prompt with administrative privileges and go under the folder c:\windows\system32\sysprep\ . I run the command sysprep /generalize /oobe /shutdown /unattend:unattend.xml here (Figure 8). Operating system run the command for sometime and shutdown itself. Now I have an operating system that its SID value is resetted, all the temporary files are cleaned and ready to be imaged. Therefore I can begin to capture the image.

Figure 8: sysprep command
I will capture the image by using WDS server. I wrote an article about WDS server installation and configuration before (http://www.ipsure.com/blog/2010/wds-installation-01/ and http://www.ipsure.com/blog/2010/wds-installation-02/ ). After building WDS infrastructure by following the article, we have to bind an “Capture Image” to our WDS server to the “Boot Images” section of WDS administration interface. The “Capture Image” helps to image an already installed Windows machine via network connection (an improved version of riprep command for RIS server). How to bind the “Capture Image” to our WDS server is explained by an early article http://www.ipsure.com/blog/2010/windows-xp-installation-using-wds/ .
I restart the newly installed and syspreped computer and set the machine to boot via ethernet card in BIOS. After this setting, I boot the machine with WDS (F12 button). I select the capture image from the menu. A wizard is started and asks me the partition to be captured. I select C:\ drive here and click Next. I have to mention that there has to be a USB flash disk or external harddisk attached to the machine to copy the new capture image into. After we create the image in the (i.e.) external hard drive, I copy it to WDS server and publish it (Figure 9). There is one simple setting that I have to do here. I right click the newly published image on WDS administration interface and on General tab, I select “Allow image to install in unattended mode” checkbox. I find my answer file here (Figure 9).

Figure 9: Settings for unattended installation
The rest is the same as it is explained in the article http://www.ipsure.com/blog/2010/windows-xp-installation-using-wds/ . Therefore, I will not go into detail. Just the difference is, Windows installation wizard will ask only the followings because of the answer file:
a) Language selection (Figure 10)
b) Country, time, keyboard selection (Figure 11)
c) Computer name screen (Figure 12)

Figure 10: Language selection screen

Figure 11: Keyboard selection screen

Figure 12: Computer name screen
After the installation via WDS, I have the same operating system as the original machine. By the help of answer file, first logon is automatically done with administrator account. This is where you can create additional users, add the machine to domain or doing anything you want.
This is the end of this article. With this second part, I explained the operating system installation via WDS with unattended answer file. Have a good day. Bye for now.






RSS feed for comments on this post.




