{"id":62,"date":"2011-06-16T09:18:16","date_gmt":"2011-06-16T14:18:16","guid":{"rendered":"http:\/\/people.williams.edu\/lj1\/?p=62"},"modified":"2018-04-19T11:41:26","modified_gmt":"2018-04-19T16:41:26","slug":"creating-a-pre-install-environment-with-waik-windows","status":"publish","type":"post","link":"https:\/\/sites.williams.edu\/lj1\/labs\/creating-a-pre-install-environment-with-waik-windows\/","title":{"rendered":"Windows &#8211; Creating a pre-install environment with WAIK &#8211; Windows"},"content":{"rendered":"<p>You must download and install the correct version of the<a href=\"https:\/\/blogs.technet.microsoft.com\/ausoemteam\/2016\/08\/03\/windows-adk-for-windows-10-version-1607-available-for-download\/\"> Windows 10 WAIK<\/a> to create a WinPE installation environment.\u00a0 You should use the version of the WAIK that matches the version of windows you intend to install. This will install as a &#8220;Windows Kit&#8221; and includes a <strong>command-line interface called &#8220;Deploying and Imaging Tools&#8221;<\/strong> to run the commandd below.\u00a0 Be sure to <strong>open that command line with &#8220;run as admin&#8221;<\/strong> or the commands below will not work.<\/p>\n<p>Also note that as part of the WAIK kit you get the &#8220;Windows System Image Manager&#8221; application which is used to <a href=\"http:\/\/sites.williams.edu\/lj1\/labs\/windows-creating-a-sysprep-answer-file\/\">create\/update sysprep answer files<\/a> used in the image preparation process.<\/p>\n<p>Also, before getting started, however, you need to collect the drivers you will need in your boot environment into a single directory (my example below uses C:\\Lab_x86_Drivers\\ &#8212; the &#8220;x86&#8221; gives away the fact these are 32-bit drivers). Download the drivers you need to a temp directory one at a time. Then in that temp directory, expand the drivers. Since these are not drivers for the system you are building this on you should not expand these in the dell\/drivers folder for example. Also, when the installation process starts &#8211; cancel it immediately. You&#8217;ll be left in that temp directory with the expanded, unzipped drivers which you should then move to your drivers directory of something like C:\\Lab_x86_Drivers\\. I keep individual drivers separated in different folders within this one root fold. The command below to incorporate the drivers into you boot environment will recurse the entire driver folder structure to find all the drivers you have stored there.<\/p>\n<p>NOTE: Lines that begin with # are comments, all other lines are commands that you give in the command window opened as described above &#8230;<\/p>\n<blockquote><p># Lynna Jackson&#8217;s &#8211; WinPE &#8211; Pre-Install Boot Environment build steps &#8211; 2017<br \/>\n# Creates USB and or CD bootable devices with custom menu<br \/>\n# Download and install windows 10 WAIK from microsoft<br \/>\n# Open Deployment Tools command prompt with admin privs<\/p>\n<p># This creates a 32-bit boot environment which is needed for Ghost<\/p>\n<p># this is not an executable batch file &#8230;.<br \/>\n# execute commands below in order by manually copy\/paste to the deployment tools cmd windows<\/p>\n<p># Clean-up any left over crap<br \/>\nDISM \/Cleanup-Wim<\/p>\n<p># remove c:\\winpe_x86 directory<br \/>\nrmdir \/S c:\\winpe_x86<\/p>\n<p># creates\/recreates a clean winpe_x86 directory at c:\\ and copies winpe files into place<br \/>\ncopype.cmd x86 c:\\winpe_x86<\/p>\n<p># mount the winpe wim file<br \/>\nDism \/Mount-Wim \/WimFile:C:\\winpe_x86\\media\\sources\\boot.wim \/index:1 \/MountDir:C:\\winpe_x86\\mount<\/p>\n<p># check on the packages loaded<br \/>\nDism \/image:c:\\winpe_x86\\mount \/Get-Packages<\/p>\n<p># Find and copy cab files &#8211; inthe windos 10 aik these were in:<br \/>\n# C:\\Program Files (x86)\\Windows Kits\\10\\Assessment and Deployment Kit\\Windows Preinstallation Environment\\x86\\WinPE_OCs&#8221;<br \/>\n# copy the specifc cabs you need to the c:\\lj1_winpe\\windows10cabs\\ folder<\/p>\n<p># then add packages to the mounted image<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:C:\\LJ1_WinPe\\windows10cabs\\WinPE-HTA.cab<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-HTA_en-us.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-WMI.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-WMI_en-us.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-WDS-Tools.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-WDS-Tools_en-us.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-Scripting.cab&#8221;<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Package \/PackagePath:&#8221;C:\\LJ1_WinPe\\windows10cabs\\WinPE-Scripting_en-us.cab&#8221;<\/p>\n<p># check on the drivers loaded<br \/>\nDism \/image:c:\\winpe_x86\\mount \/Get-Drivers<\/p>\n<p># add drivers &#8211; (This is a 32-bit boot environment so you need 32-bit drivers &#8230; )<br \/>\nDism \/image:C:\\winpe_x86\\mount \/Add-Driver \/Recurse \/driver:C:\\lj1_winPe\\x86_Drivers\\<\/p>\n<p># add custom scripts<br \/>\nxcopy \/e \/y &#8220;C:\\lj1_winPe\\Lab_winpe_scripts&#8221; C:\\winpe_x86\\mount\\Windows\\System32\\<\/p>\n<p># increase ram disk scratch space for application<br \/>\ndism \/image:c:\\winpe_x86\\mount \/Set-ScratchSpace:512<\/p>\n<p># set the time zone<br \/>\ndism \/image:c:\\winpe_x86\\mount \/set-timezone:&#8221;Eastern Standard Time&#8221;<\/p>\n<p># unmount win_pe image and commit changes<br \/>\nDism \/Unmount-Wim \/MountDir:C:\\winpe_x86\\mount\\ \/Commit<\/p>\n<p># copy customized winpe boot environment<br \/>\ncopy c:\\winpe_x86\\winpe.wim c:\\winpe_x86\\ISO\\sources\\boot.wim \/Y<\/p>\n<p># create the ISO for the boot disk<br \/>\noscdimg -n -bc:\\winpe_x86\\fwfiles\\etfsboot.com c:\\winpe_x86\\media c:\\winpe_x86\\winpe_x86.iso<\/p>\n<p># burn iso to cd<\/p>\n<p># and\/or mount iso to copy contents to bootable USb devices (see notes below to format correctly)<\/p>\n<p># copy the ISO contents to formated USB stick (see notes about diskpart format below)<br \/>\nxcopy [mounted iso directory]*.* \/e f:\\<\/p>\n<p># copy the ISO contents to the saved location on your hard drive to keep it safe<br \/>\n# the winpe_x86 directory is erased and recreated each time you run this process<br \/>\ncopy c:\\winpe_x86\\winpe_x86.iso c:\\lj1_WinPE\\<\/p>\n<p>=======================================<\/p>\n<p>Formatting a USB stick to make it bootable &#8230;<\/p>\n<p>C:\\diskpart<\/p>\n<p>Microsoft DiskPart version 6.1.7600<br \/>\nCopyright (C) 1999-2008 Microsoft Corporation.<br \/>\nOn computer: LAB-WIN7-DEV<\/p>\n<p>DISKPART&gt; list disk<\/p>\n<p>Disk ### Status Size Free Dyn Gpt<br \/>\n&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;- &#8212; &#8212;<br \/>\nDisk 0 Online 149 GB 0 B<br \/>\nDisk 1 Online 1928 MB 0 B<\/p>\n<p>DISKPART&gt; sel disk 1<\/p>\n<p>Disk 1 is now the selected disk.<\/p>\n<p>DISKPART&gt; clean<\/p>\n<p>DiskPart succeeded in cleaning the disk.<\/p>\n<p>DISKPART&gt; create parti prim<\/p>\n<p>DiskPart succeeded in creating the specified partition.<\/p>\n<p>DISKPART&gt; active<\/p>\n<p>DiskPart marked the current partition as active.<\/p>\n<p>DISKPART&gt; format fs=NTFS quick<\/p>\n<p>100 percent completed<\/p>\n<p>DiskPart successfully formatted the volume.<\/p>\n<p>DISKPART&gt; assign<\/p>\n<p>DiskPart successfully assigned the drive letter or mount point.<\/p>\n<p>DISKPART&gt; exit<\/p>\n<p>Leaving DiskPart&#8230;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You must download and install the correct version of the Windows 10 WAIK to create a WinPE installation environment.\u00a0 You should use the version of the WAIK that matches the version of windows you intend to install. This will install &hellip; <a class=\"more-link\" href=\"https:\/\/sites.williams.edu\/lj1\/labs\/creating-a-pre-install-environment-with-waik-windows\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10086],"tags":[10095,10096,10088],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-labs","tag-boot","tag-image","tag-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/comments?post=62"}],"version-history":[{"count":9,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":995,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/posts\/62\/revisions\/995"}],"wp:attachment":[{"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/media?parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/categories?post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.williams.edu\/lj1\/wp-json\/wp\/v2\/tags?post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}