{"id":920,"date":"2012-03-01T23:56:11","date_gmt":"2012-03-02T04:56:11","guid":{"rendered":"http:\/\/swildow.darktech.org\/wp\/?p=920"},"modified":"2012-03-01T23:56:11","modified_gmt":"2012-03-02T04:56:11","slug":"sysprep-a-windows-7-machine-start-to-finish-v2","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=920","title":{"rendered":"Sysprep a Windows 7 Machine \u2013 Start to Finish V2"},"content":{"rendered":"<p><a href=\"http:\/\/blog.brianleejackson.com\/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2\">http:\/\/blog.brianleejackson.com\/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2<\/a><\/p>\n<h1>Sysprep a Windows 7 Machine \u2013 Start to Finish V2<\/h1>\n<div>\n<h4>SPREAD THE WORD, TOGETHER WE HAVE CONQUERED SYSPREP\u00a0<img decoding=\"async\" src=\"http:\/\/blog.brianleejackson.com\/wp-includes\/images\/smilies\/icon_smile.gif\" alt=\":)\" \/><\/h4>\n<p><!--more--><\/p>\n<p>This is version 2 of a step by step guide on Sysprepping a\u00a0<a href=\"http:\/\/amzn.to\/oFGSrS\" target=\"_blank\">Windows 7<\/a>\u00a0machine from start to finish. I cannot take full credit on this because my first article had so many helpful comments and discussions that this is simply a combination of all the good advice written into a working guide.\u00a0<strong>(I would especially like to thank George for his input on Cscript for auto activation and Nathan for input on Sysprep Audit Mode).<\/strong>\u00a0This will guide you through the following:<\/p>\n<blockquote><p><strong>&#8211;<\/strong>\u00a0Audit Mode<br \/>\n<strong>&#8211;<\/strong>\u00a0Building the unattend.xml file in WSIM<br \/>\n<strong>&#8211;<\/strong>\u00a0<strong>copyprofile=true<\/strong>\u00a0command to copy the default profile (no manual copy)<br \/>\n<strong>&#8211;<\/strong>\u00a0Prompt for a computer name<br \/>\n<strong>&#8211;<\/strong>\u00a0Enable Administrator account<br \/>\n<strong>&#8211;<\/strong>\u00a0Administrator account logs in first time automatically<br \/>\n<strong>&#8211;<\/strong>\u00a0Activate windows automatically with Cscript;<br \/>\n<strong>&#8211;<\/strong>\u00a0Successfully copy over taskbar icons;<br \/>\n<strong>&#8211;<\/strong>\u00a0Delete unattend.xml file automatically upon completion of re-image.<\/p><\/blockquote>\n<p>Here is a list of what you will need:<\/p>\n<blockquote><p><strong>&#8211;<\/strong>\u00a0Latest version of WAIK :\u00a0<a href=\"http:\/\/www.microsoft.com\/DOWNLOADS\/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&amp;displaylang=en\">KB3AIK_EN.iso Version 1.0<\/a><br \/>\n<strong>&#8211;<\/strong>\u00a0Windows Vista or\u00a0<a href=\"http:\/\/amzn.to\/oFGSrS\" target=\"_blank\">Windows 7<\/a>\u00a0Machine to build the XML file on<br \/>\n<strong>&#8211;<\/strong>\u00a0ISO or DVD of Windows 7 Installation (x32 or x64)<br \/>\n<strong>&#8211;<\/strong>\u00a0WinPE Boot Environment :\u00a0<a href=\"http:\/\/blog.brianleejackson.com\/winpe-3-0-boot-environment-scripts\">BrianLeeJackson WinPE 3.0 BootLoader<\/a><\/p><\/blockquote>\n<p>First we are going to walk through building the unattend.xml file (answer file) and then we will walk through the actual Windows 7 imaging process.<\/p>\n<h2><\/h2>\n<h2>Step #1<\/h2>\n<p>If you have a\u00a0<a href=\"http:\/\/amzn.to\/oFGSrS\" target=\"_blank\">Windows 7<\/a>\u00a0installation DVD, insert it now. Or if you have an ISO of 7, go ahead and extract it to a folder on your desktop. (I recommend 7-zip).<\/p>\n<h2>Step #2<\/h2>\n<p>Launch Windows System Image Manager. Your start menu should look like the image below:<\/p>\n<div id=\"attachment_609\"><a href=\"http:\/\/www.microsoft.com\/DOWNLOADS\/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&amp;displaylang=en\"><img loading=\"lazy\" decoding=\"async\" title=\"Windows 7 WAIK Version 1\" src=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2009\/09\/7_sys_1.png\" alt=\"Windows 7 WAIK Version 1\" width=\"416\" height=\"98\" \/><\/a>Windows 7 WAIK Version 1<\/p>\n<\/div>\n<h2>Step #3<\/h2>\n<p>Under the \u201cWindows Image\u201d header, right click and select new image.<\/p>\n<div id=\"attachment_616\"><a href=\"http:\/\/www.microsoft.com\/DOWNLOADS\/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&amp;displaylang=en\"><img decoding=\"async\" title=\"Windows System Image Manager\" src=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2009\/09\/7_sys_2.png\" alt=\"Windows System Image Manager\" width=\"600\" \/><\/a>Windows System Image Manager<\/p>\n<\/div>\n<h2>Step #4<\/h2>\n<p>You will now want to browse to the .CLG file in your Windows 7 installation (I am using Windows 7 Enterprise x64 in my example). It is located in the sources folder. See Image below.\u00a0<strong>You can select either the .clg file or the install.wim. Both will have the same result.<\/strong><\/p>\n<div id=\"attachment_619\"><a href=\"http:\/\/www.microsoft.com\/DOWNLOADS\/details.aspx?familyid=696DD665-9F76-4177-A811-39C26D3B3B34&amp;displaylang=en\"><img loading=\"lazy\" decoding=\"async\" title=\"Selecting CLG File - WSIM\" src=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2009\/09\/7_sys_3.png\" alt=\"Selecting CLG File - WSIM\" width=\"577\" height=\"428\" \/><\/a>Selecting CLG File &#8211; WSIM<\/p>\n<\/div>\n<h2>Step #5<\/h2>\n<p>Now we need to create a new answer file. Go to the file menu and select \u201cCreate New Answer File.\u201d Right after creating one, go ahead and simply go to file menu and select \u201cSave Answer File.\u201d This will give your XML file a name and save location. I chose to name mine\u00a0<strong>unattend.xml<\/strong>. Now you see we have two category folders, Components and Packages. Under the Components folder you see that we have 7 options:<\/p>\n<blockquote><p><strong>&#8211;<\/strong>1 windowsPE<br \/>\n<strong>&#8211;<\/strong>2 offlineServicing<br \/>\n<strong>&#8211;<\/strong>3 generalize<br \/>\n<strong>&#8211;<\/strong>4 specialize<br \/>\n<strong>&#8211;<\/strong>5 auditSystem<br \/>\n<strong>&#8211;<\/strong>6 auditUser<br \/>\n<strong>&#8211;<\/strong>7 oobeSystem<\/p><\/blockquote>\n<h2>Step #6<\/h2>\n<p>These are very important as these are the steps in which the unattend.xml file is sequenced.<br \/>\nThe next part is a little confusing. You are going to add components, from under the \u201cWindows Image\u201d 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 \u201cadd to # pass\u201d. 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.<\/p>\n<div id=\"attachment_869\"><a href=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2010\/01\/sysprep4.png\"><img loading=\"lazy\" decoding=\"async\" title=\"Answer File - Unattend.xml\" src=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2010\/01\/sysprep4.png\" alt=\"Answer File - Unattend.xml\" width=\"461\" height=\"508\" \/><\/a>Answer File &#8211; Unattend.xml<\/p>\n<\/div>\n<p>Here is more information about adding options under the passes:<\/p>\n<h3>1 windowsPE<\/h3>\n<blockquote><p>Nothing required in my example.<\/p><\/blockquote>\n<h3>2 offlineServicing<\/h3>\n<blockquote><p>Nothing required in my example.<\/p><\/blockquote>\n<h3>3 generalize<\/h3>\n<blockquote><p><em><strong>amd64_Microsoft-Windows-Security-SPP_6.1.7600.16385_neutral<\/strong><\/em><\/p>\n<blockquote><p>Set 1 for SkipRearm to allow up to 8 rearms<\/p><\/blockquote>\n<\/blockquote>\n<h3>4 specialize<\/h3>\n<blockquote><p><strong><em>amd64_Microsoft-Windows-Deployment_6.1.7600.16385_neutral<\/em><\/strong><em><\/em><\/p>\n<blockquote>\n<ol>\n<ol>\n<li>\n<ol>\n<ol>\n<li><strong>Order:<\/strong>\n<ol>\n<ol>\u00a01<\/ol>\n<\/ol>\n<p><strong>path:<\/strong><\/p>\n<ol>\n<ol>\u00a0net user administrator \/active:yes<\/ol>\n<\/ol>\n<p><strong>WillReboot:<\/strong><\/p>\n<ol>\u00a0Never<\/ol>\n<\/li>\n<\/ol>\n<\/ol>\n<p>RunSynchronousCommand[Order=&#8221;1&#8243;]<\/li>\n<\/ol>\n<\/ol>\n<p>RunSynchronous<\/p><\/blockquote>\n<p><em><strong>amd64_Microsoft-Windows-Security-SPP-UX_6.1.7600.16385_neutral<\/strong><\/em><\/p>\n<blockquote><p><strong>SkipAutoActivation<\/strong>: true<\/p><\/blockquote>\n<p><em><strong>amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral<\/strong><\/em><\/p>\n<blockquote><p><strong>Computer Name<\/strong>: Leave blank (we will deal with this at the end)<br \/>\n<strong>CopyProfile<\/strong>: true<br \/>\n<strong>Registered Organization<\/strong>: Microsoft (you must leave this in this section)<br \/>\n<strong>Registered Owner<\/strong>: AutoBVT (you must leave this in this section)<br \/>\n<strong>ShowWindowsLive<\/strong>: false<br \/>\n<strong>TimeZone<\/strong>: Pacific Standard Time<\/p>\n<p>(Please view TimeZone settings here -&gt;\u00a0<a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc749073%28WS.10%29.aspx\">http:\/\/technet.microsoft.com\/en-us\/library\/cc749073%28WS.10%29.aspx<\/a>)<\/p>\n<p>You can delete other sub-header components if you don\u2019t need them.<\/p><\/blockquote>\n<\/blockquote>\n<h3>5 auditSystem<\/h3>\n<blockquote><p>Nothing required in my example.<\/p><\/blockquote>\n<h3>6 auditUser<\/h3>\n<blockquote><p>Nothing required in my example.<\/p><\/blockquote>\n<h3>7 oobeSystem<\/h3>\n<blockquote><p><strong><em>amd64_Microsoft-Windows-International-Core_6.1.7600.16385_neutral<\/em><\/strong><em><\/em><\/p>\n<blockquote><p><strong>InputLocale:<\/strong>\u00a0en-us<br \/>\n<strong>SystemLocale:<\/strong>\u00a0en-us<br \/>\n<strong>UILanguage:<\/strong>\u00a0en-us<br \/>\n<strong>UserLocale:<\/strong>\u00a0en-us<\/p><\/blockquote>\n<p><strong><em>amd64_Microsoft-Windows-Shell-Setup_6.1.7600.16385_neutral<\/em><\/strong><em><\/em><\/p>\n<blockquote><p><strong>RegisteredOrganization<\/strong>: Your Company Name<br \/>\n<strong>RegisteredOwner<\/strong>: Your Name<\/p>\n<ul>\n<li><strong><em>AutoLogon<\/em><\/strong><em><\/em><\/li>\n<\/ul>\n<ol>\n<ol>\n<li><strong>Password<\/strong>\n<ol>: Administrator Password<\/ol>\n<\/li>\n<\/ol>\n<\/ol>\n<p><strong>Enabled<\/strong>: true<br \/>\n<strong>LogonCount<\/strong>: 5<br \/>\n<strong>Username<\/strong>: administrator<\/p>\n<ul>\n<li><strong><em>FirstLogonCommands<\/em><\/strong><em><\/em><\/li>\n<\/ul>\n<ol>\n<ol>\n<li><strong>CommandLine:<\/strong>\n<ol>\n<ol>\u00a0cscript \/\/b c:\\windows\\system32\\slmgr.vbs \/ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (windows 7 license key)<\/ol>\n<\/ol>\n<p><strong>Order<\/strong><\/p>\n<ol>\n<ol>\u00a01<\/ol>\n<\/ol>\n<p><strong>RequiresUserInput:<\/strong><\/p>\n<ol>\u00a0false<\/ol>\n<p><strong>CommandLine:<\/strong><\/p>\n<ol>\n<ol>\u00a0cscript \/\/b c:\\windows\\system32\\slmgr.vbs \/ato<\/ol>\n<\/ol>\n<p><strong>Order<\/strong><\/p>\n<ol>\n<ol>\u00a02<\/ol>\n<\/ol>\n<p><strong>RequiresUserInput:<\/strong><\/p>\n<ol>\u00a0false<\/ol>\n<\/li>\n<\/ol>\n<\/ol>\n<p>SynchronousCommand[Order=&#8221;1&#8243;]<\/p>\n<p>SynchronousCommand[Order=&#8221;2&#8243;]<\/p>\n<ul>\n<li><strong><em>OOBE<\/em><\/strong><\/li>\n<\/ul>\n<p><strong>HideEULAPage:<\/strong><\/p>\n<ol>\n<ol>\u00a0true<\/ol>\n<\/ol>\n<p><strong>NetworkLocation:<\/strong><\/p>\n<ol>\n<ol>\u00a0Home<\/ol>\n<\/ol>\n<p><strong>ProtectYourPC:<\/strong><\/p>\n<ol>\u00a01<\/ol>\n<ul>\n<li><strong><em>UserAccounts<\/em><\/strong><\/li>\n<\/ul>\n<ol>\n<ol>\n<li>\n<ol>\n<ol>\n<li>\n<ol>\n<ol>\n<li><strong>Password:<\/strong>\n<ol>\u00a0Administrator Password<\/ol>\n<\/li>\n<\/ol>\n<\/ol>\n<p>Action: AddListItem<br \/>\n<strong>Description:<\/strong>\u00a0Local Administrator<br \/>\n<strong>DisplayName:<\/strong>\u00a0Administrator<br \/>\n<strong>Group:<\/strong>\u00a0Administrators<br \/>\n<strong>Name:<\/strong>\u00a0Administrator<\/li>\n<\/ol>\n<\/ol>\n<p>LocalAccount[Name=&#8221;Administrator&#8221;]<\/li>\n<\/ol>\n<\/ol>\n<p><strong>AdministratorPassword:<\/strong>\u00a0Administrator Password<br \/>\n<strong>LocalAccounts<\/strong><\/p><\/blockquote>\n<\/blockquote>\n<p>If you have questions, look at my image above to see full layout of components, it should help.<\/p>\n<h2>Step #7<\/h2>\n<p>K, now go ahead and save your answer file as unattend.xml.<\/p>\n<h2>Step #8<\/h2>\n<p>If you want the sysprep to prompt for a computer name you need to remove a line from your XML file. Open up your XML file you saved with notepad and remove the following line:<strong><\/strong><\/p>\n<div id=\"attachment_908\"><img loading=\"lazy\" decoding=\"async\" title=\"Unattend.xml Computer Name\" src=\"http:\/\/blog.brianleejackson.com\/wp-content\/uploads\/2010\/01\/sysprep5.png\" alt=\"Unattend.xml Computer Name\" width=\"358\" height=\"110\" \/>Unattend.xml Computer Name<\/p>\n<\/div>\n<h2><\/h2>\n<h2>Step #9<\/h2>\n<p>Install Windows 7 (Enterprise) from CD or USB flash drive, when you arrive at the welcome screen and it asks you to create a username, hit\u00a0<acronym>ctrl+shift+f3<\/acronym>.<br \/>\n<strong>This will reboot your machine and put your windows build in \u2018audit\u2019 mode.<\/strong><\/p>\n<h2>Step #10<\/h2>\n<p>On reboot, you\u2019ll automatically be logged in under the built-in Administrator account. A sysprep GUI box will appear, but\u00a0<strong>you can close it<\/strong>\u00a0and NOW begin to customize your profile.<\/p>\n<h2>Step #11<\/h2>\n<p>Install any software\/drivers, make any profile customizations, etc.<br \/>\n<strong>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<\/strong>copyprofile=true\u00a0<strong>in your unattended answer file, it will copy the customized Admin account to the default profile before deleting it.<\/strong><\/p>\n<h2>Step #12<\/h2>\n<p>On the PC you are going to be running sysprep on, you need to create a folder called\u00a0<strong>scripts<\/strong>\u00a0in 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. Edit the cmd file with notepad and insert this line:\u00a0<strong>del \/Q \/F c:\\windows\\system32\\sysprep\\unattend.xml<\/strong>. This script will delete your unattend.xml file after it has been used. 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,\u00a0<strong>del \/Q \/F c:\\windows\\panther\\unattend.xml<\/strong>. If you have passwords or cd keys stored in that xml file you don\u2019t have to worry about it being left on the computer.<\/p>\n<p><strong>UPDATE AS OF JUNE 16TH: Read my\u00a0<a href=\"http:\/\/blog.brianleejackson.com\/copy-taskbar-icons-windows-7-sysprep\">Taskbar Icons Tutorial<\/a>\u00a0before continuing.<\/strong><\/p>\n<h2>Step #13<\/h2>\n<p>Once you have everything configured correctly, Copy or move your unattend.xml file to : C:windowssystem32sysprep. Now to run sysprep, navigate to that sysprep folder, hold SHIFT and right click and select \u201cOpen New Command Windows Here\u201d. Next, input the following commands:<\/p>\n<p><strong>sysprep \/generalize \/oobe \/shutdown \/unattend:unattend.xml<\/strong><\/p>\n<h2>Step #14<\/h2>\n<p>Turn the computer back on and boot to WinPE 3.0 environment (USB stick or CD\/DVD). You can use my\u00a0<a href=\"http:\/\/blog.brianleejackson.com\/winpe-3-0-boot-environment-scripts\">BrianLeeJackson WinPE3.0 BootLoader<\/a>\u00a0to boot up from USB or CD and capture your image. Capture image and save image to network location.<br \/>\n<strong>A Dell 960 or GX755 is a good standard for capturing when you want a generic image for use with multiple systems. Might require injecting additional drivers for 3rd party brands, HP, etc. Most should work though right out of the box.<\/strong><\/p>\n<h2>Step #15<\/h2>\n<p>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. Enjoy!<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/blog.brianleejackson.com\/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2 Sysprep a Windows 7 Machine \u2013 Start to Finish V2 SPREAD THE WORD, TOGETHER WE HAVE CONQUERED SYSPREP\u00a0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-920","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=920"}],"version-history":[{"count":1,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/920\/revisions"}],"predecessor-version":[{"id":921,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/920\/revisions\/921"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=920"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}