Create an Windows 7 unattended image.
This is a step by step guide on using sysprep to make a Windows 7 machine ready for deployment from start to finish.
| 1. | Install The Windows Automated Installation Kit (AIK) for Windows 7 onto your computer. | |
|---|---|---|
| 2. | After installation finish start Windows System Image Manager from start menu. It will be look like this. | |
| 3. | Right click on “Select a Windows image or catalog file” under Windows Image and click “Select Windows image” . Point to Sourcedirectory in the Windows 7 DVD, highlight “install.wim” and click open. | |
| 4. | Right click on “Create or open an answer file” under Answer File and click “New Answer File…” | |
| 5. | The next part is a little confusing. You are going to add components, from under the “Windows Image” section on the bottom left hand side to the passes on your Answer File. To add a component, you can right click on them and select “add to # pass”. There are many different options you can add, but they have to be done in a certain order and pass otherwise your sysprep might fail. I am simply going to use the one I created as the example. (If you are using 32-bit operating system components will be stating “amd64″ instead of “x86″)
Adding the components:
1- x86_Microsoft-Windows-Security-SPP_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 3 generalize“) 2- x86_Microsoft-Windows-Deployment_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 4 specialize“) 3- x86_Microsoft-Windows-Security-SPP-UX_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 4 specialize“) 4- x86_Microsoft-Windows-Shell-Setup_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 4 specialize“) 5- x86_Microsoft-Windows-International-Core_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 7 oobeSystem“) 6- x86_Microsoft-Windows-Shell-Setup_6.1.7601.17514_neutral (Right Click and select “Add Settings To Pass 7 oobeSystem“) After adding all the components to Answer File section it should be look like this. | |
| 6. | Configuring the components: when you click on the components you would like to configure, properties will appear right hand on the screen. | |
| 7. | x86_Microsoft-Windows-Security-SPP_6.1.7601.17514_neutral (under 3 generalize)
SkipRearm = 1
| |
| 8. | x86_Microsoft-Windows-Deployment_6.1.7601.17514_neutral (under 4 specialize)
1- Expand it and right click on “RunSynchronous”. Select “Insert New RunSynchronousCommand”. Highlight newly created “RunSynchronousCommand”
2- Order: 1 3- path: net user administrator /active:yes 4- WillReboot: Never | |
| 9. | x86_Microsoft-Windows-Security-SPP-UX_6.1.7601.17514_neutral (under 4 specialize)
SkipAutoActivation: true
| |
| 10. | x86_Microsoft-Windows-Shell-Setup_6.1.7601.17514_neutral (under 4 specialize)
1- Computer Name: Leave blank (for automatic naming)
2- CopyProfile: true 3- ProductKey: type your product key 4- Registered Organization: Microsoft (you must leave this in this section) 5- Registered Owner: AutoBVT (you must leave this in this section) 6- ShowWindowsLive: false 7- TimeZone: Pacific Standard Time (for other time zones go tohttp://technet.microsoft.com/en-us/library/cc749073%28WS.10%29.aspx) | |
| 11. | x86_Microsoft-Windows-International-Core_6.1.7601.17514_neutral (under 7 oobeSystem)
1- InputLocale: en-us
2- SystemLocale: en-us 3- UILanguage: en-us 4- UserLocale: en-us | |
| 12. | x86_Microsoft-Windows-Shell-Setup_6.1.7601.17514_neutral (under 7 oobeSystem)
1- RegisteredOrganization: Your Company Name
2- RegisteredOwner: Your Name | |
| 13. | xpend “x86_Microsoft-Windows-Shell-Setup_6.1.7601.17514_neutral” and highlight “AutoLogon”
1- Enabled: true
2- LogonCount: 5 3- Username: administrator | |
| 14. | Expend “AutoLogon” and highlight “Password”
Value: Administrator Password
| |
| 15. | Right Click on “FirstLogonCommands” and select “Insert New SynchronousCommand” do this twice, so you will have two “SynchronousCommand” under “FirstLogonCommands”. Highlight first one.
1- CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (windows 7 license key)
2- Order: 1 3- RequiresUserInput: false 4- Highlight second ”SynchronousCommand” 5- CommandLine: cscript /b c:\windows\system32\slmgr.vbs /ato 6- Order 2 7- RequiresUserInput: false | |
| 16. | Highlight “OOBE”
1- HideEULAPage: true
2- HideWirelessSetupInOOBE: true 3- NetworkLocation: Home 4- ProtectYourPC: 1 | |
| 17. | Expand “UserAccounts” highlight “AdministratorPassword”
1- Value: Administrator password
2- Right click on “LocalAccounts” and select “Insert New LocalAccount”. Highlight new created “LocalAccount” 3- Description: Local Administrator 4- DisplayName: Administrator 5- Group: Administrators 6- Name: Administrator 7- Highlight “Password” 8- Value: Administrator password | |
| 18. | Answer file configuration is finish and your answer file should be looks like image below. Now you can save the answer file. | |
| 19. | Install Windows 7 from CD or USB flash drive, when you see the welcome screen and it asks you to create a username, hit CTRL+SHIFT+F3. This will reboot your machine and restart windows in built in ‘audit’ mode. | |
| 20. | On reboot, you’ll automatically be logged in under the built-in Administrator account. A sysprep GUI box will appear, but you can close it and now begin to customize your profile. | |
| 21. | Install any software/drivers, make any profile customizations, etc. If you need to reboot, the computer will boot you back into the Administrator account. You will be stuck in this audit mode until you run sysprep with the /oobe parameter. After doing so, sysprep will delete/clean up the Administrator account, but if you have copyprofile=true in your unattended answer file, it will copy the customized Admin account to the default profile before deleting it. | |
| 22. | On the PC you are going to be running sysprep on, you need to create a folder called scripts in this directory: %WINDIR%\Setup\. Now you are going to create a CMD file within the %WINDIR%\Setup\Scripts directory. Right click and make a new text file called SetupComplete.txt. Remove the .txt extension and replace that with .cmd. You now have a SetupComplete.cmd file which windows will read the first time it boots up from the sysprep. We need to place a script inside the CMD file. Right click the SetupComplate.cmd and select edit, this will open notepad and copy the following lines and paste into the notepad:
1- del /Q /F c:\windows\system32\sysprep\unattend.xml. This script will delete your unattend.xml file after it has been used.
2- del /Q /F c:\windows\panther\unattend.xml. The unattend.xml file is also copied to the C:\Windows\Panther directory, so you will want to add a second line to the CMD file, If you have passwords or cd keys stored in that xml file you don’t have to worry about it being left on the computer. | |
| 23. | Once you have everything configured correctly, Copy your unattend.xml file to : C:\windows\system32\sysprep. In the same folder, hold SHIFT and right click and select “Open New Command Windows Here” to run sysprep. Enter the following commands to command line:
sysprep /generalize /oobe /shutdown /unattend:unattend.xml
| |
| 24. | I’m using Clonezilla or FOG for taking an image. You can same the image on external HDD or Network resource. |
Conclusion
On reboot, Windows will run out of the box, as the /oobe is intended. As long as you put your cd key into the unattend.xml file, windows will be activated automatically in the background, you will be automatically logged into the administrator account, and the unattend.xml file is deleted. You are now ready to use the computer or join it to the domain.
Comments
Post a Comment