Friday, May 6, 2016

Creating Windows 10 WinFE dual x64/x86 Boot Disc with MacBook, Bitlocker Support, Dell Servers


Creating Windows 10 WinFE dual x64/x86 Boot Disc with MacBook, Bitlocker Support, Dell Servers

1. Install Windows AIK for Win8.1 and install or Windows 10 AIK. Default install is good.

2. Download Virtual Clone and install.

3. Open Deployment and Imaging Tools Environment command prompt as admin.



4. Traverse into the right directory.

cd ..

cd Windows Preinstallation Environment



5. Create the mount area.

x64

copype amd64 c:\winfe_x64


x86

copype x86 c:\winfe_x86



6. Mount the *.wim

x64

Dism /Mount-Wim /WimFile:c:\winFE_x64\media\sources\boot.wim /index:1 /MountDir:c:\winFE_x64\mount

x86

Dism /Mount-Wim /WimFile:c:\winFE_x86\media\sources\boot.wim /index:1 /MountDir:c:\winFE_x86\mount



7. Open regedit. Need to make sure the disc will not mount devices.



Win8.1                                                                     Win10

8. Highlight HKLM --> File --> Load Hive

9. Locate the SYSTEM hive file here: C:\winfe_x64\mount\Windows\System32\config\SYSTEM

10. Call it winfe



11. Locate the following key HKLM\winFE\ControlSet001\Services\mountmgr –> Right click right panel and select New –> DWORD.

12. Name it NoAutoMount = 1



13. Modify HKLM\winFE\ControlSet001\Services\partmgr\parameters\sanpolicy = 3



14. Optional: HKLM\winFE\ControlSet001\Control\FileSystem\DisableDeleteNotification = 1



15. Highlight winFE. Select File –> Unload Hive… Confirm Close



16. Add more RAM capacity (512 / 256 / 128)

x64


Dism.exe /image:c:\winfe_x64\mount /Set-ScratchSpace:512

x86

Dism.exe /image:c:\winfe_x86\mount /Set-ScratchSpace:512



17. Add bootcamp drivers, driverpacks.net, specific drivers for hardware you are using like Adaptec, etc. This is assuming you put all the drivers you want to add under the c:\drivers_x86 or c:\drivers_x64 directory:



Bootcamp drivers I got from Apple: https://support.apple.com/kb/DL1837?viewlocale=en_US&locale=en_US

Driverpacks.net from: http://driverpacks.net

Driver Pack Solutions from: https://drp.su/index.htm

(fair warning some drivers cause blue screen of death...it will tell you which one caused...it helps to have a virtual environment to test the disk before burning...you will have to remove the offending .sys file from your driver directories)

Dell WinPE Driver (these drivers are necessary to get the mouse and keyboard working)

http://en.community.dell.com/techcenter/enterprise-client/w/wiki/2065.dell-driver-cab-files-for-enterprise-client-os-deployment

x64

dism.exe /image:c:\winFE_x64\mount /add-driver /driver:c:\drivers_x64 /ForceUnsigned /recurse

x86

dism.exe /image:c:\winFE_x86\mount /add-driver /driver:c:\drivers_x86 /ForceUnsigned /recurse




18. Add VBS support:

Win8.1

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-wmi.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-wmi.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"

Win10

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-wmi.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-wmi.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"



19. Add HTA support:

Win8.1

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-hta.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\winpe-hta_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-hta.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\winpe-hta_en-us.cab"

Win10

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-hta.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\winpe-hta_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-hta.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\winpe-hta_en-us.cab"

20. Add scripting support:

Win8.1

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-scripting.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-scripting.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"

Win10

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-scripting.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\winpe-scripting.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"

21. Add powershell support

Win8.1

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-PowerShell.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"

Win10

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-PowerShell.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"

22. Optional; Add bitlocker support

Win8.1

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FMAPI.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-EnhancedStorage.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-FMAPI.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-SecureStartup.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-EnhancedStorage.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-NetFx.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"

Win10

x64

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-FMAPI.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-EnhancedStorage.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"

dism.exe /image:c:\winFE_x64\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"

x86

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-FMAPI.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-SecureStartup.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-EnhancedStorage.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-EnhancedStorage_en-us.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-NetFx.cab"

dism.exe /image:c:\winFE_x86\mount /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"

23. Add tools

x86

You'll want to add tools before you commit the changes.  You can add them inside the winfe_x86\mount\ directory like such:



The pstart.exe is like a start menu found here: http://www.pegtop.net/start/

To get pstart.exe to auto load after boot user startnet.cmd inside winfe_x86\mount\windows\system32



x64

launcherBar_x64 like pstart.exe but for x64 here: http://www.lerup.com/LaunchBar/



Some of the x64 tools I installed:

7-zip = http://www.7-zip.org/a/7z1600-x64.exe
explorer++ = https://explorerplusplus.com/
hashmyfiles = http://www.nirsoft.net/utils/hash_my_files.html
irfanview = http://www.irfanview.com/64bit.htm
notepad2 = http://www.flos-freeware.ch/notepad2.html
sumatrapdf = http://www.sumatrapdfreader.org/download-free-pdf-viewer.html
vlc = https://download.videolan.org/pub/videolan/vlc/last/win64/
fshed64 = http://www.funduc.com/fshexedit.htm

24. cd c:\

25. dismount and commit changes

x64

dism /unmount-wim /mountdir:c:\winFE_x64\mount /commit

x86

dism /unmount-wim /mountdir:c:\winFE_x86\mount /commit

26. remove bootfix.bin to remove hit any key to engage CD/DVD prompt

x64

del /f /q c:\winFE_x64\media\boot\bootfix.bin

x86

del /f /q c:\winFE_x86\media\boot\bootfix.bin

27. cd to make .iso or skip for USB after

x64

cd C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg

x86

cd C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\x86\Oscdimg

Win10

x64

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Oscdimg

x86

cd C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\Oscdimg

28. make cd

x64

oscdimg -n -bc:\winFE_x64\fwfiles\etfsboot.com c:\winFE_x64\media c:\winFE_x64\winFE_x64.iso

x86

oscdimg -n -bc:\winFE_x86\fwfiles\etfsboot.com c:\winFE_x86\media c:\winFE_x86\winFE_x86.iso

-m to force if its over 700MB

29. Burn the iso to CD/DVD and boot it. Do some testing and determine that your disc does not mount or change your target system.

30. Make USB (F: is the drive letter of your USB thumb drive you wish to install WinFE on to)

x64

MakeWinPEMedia /UFD C:\winFE_x64 F:

x86

MakeWinPEMedia /UFD C:\winFE_x86 F:

31. If you choose to dual boot both x64 and x86 from one CD/DVD this is how you do it.

mkdir c:\winfe_both

xcopy /Y /E /I c:\winfe_x86\fwfiles c:\winfe_both\fwfiles\

xcopy /Y /E /I c:\winfe_x86\media c:\winfe_both\media\

ren C:\winfe_both\media\sources\boot.wim boot_x86.wim

copy c:\winfe_x64\media\sources\boot.wim c:\winfe_both\media\sources\boot_x64.wim

bcdedit /store C:\winfe_both\media\Boot\BCD /enum | find "osdevice"



Take note of the GUID and make sure you use yours if its different.

bcdedit /store C:\winfe_both\media\Boot\BCD /set {default} device ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}



Notice the subtle difference

bcdedit /store C:\winfe_both\media\Boot\BCD /set {default} osdevice ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}



bcdedit /store C:\winfe_both\media\Boot\BCD /set {default} description "WinFE 10 x86"

bcdedit /store C:\winfe_both\media\Boot\BCD /copy {default} /d "WinFE 10 x64"

note GUID



bcdedit /store C:\winfe_both\media\Boot\BCD /set {d3ccda44-1fc3-11e6-bddc-20c9d0b83e02} device ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

bcdedit /store C:\winfe_both\media\Boot\BCD /set {d3ccda44-1fc3-11e6-bddc-20c9d0b83e02} osdevice ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

bcdedit.exe /store C:\winfe_both\media\Boot\BCD /deletevalue {default} bootmenupolicy

Create the CD/DVD iso

MakeWinPEMedia /iso /f C:\winfe_both C:\winfe_both\WinFE-10-DualBoot.iso

Create USB

MakeWinPEMedia /ufd /f C:\winfe_both F: