Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2017 20:26
Show Gist options
  • Save anonymous/3f7dae1e8f370c2d83f064980a3ecd94 to your computer and use it in GitHub Desktop.
Save anonymous/3f7dae1e8f370c2d83f064980a3ecd94 to your computer and use it in GitHub Desktop.
Making a WinPE device that can unlock a bootlocker'd drive

Adapted from http://digitalhacksblog.blogspot.com/2015/01/it-worked-for-me-winpe-bitlocker-and.html, updated for Windows 10

C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools>dism /mount-wim /wimfile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:c:\winpe_amd64\mount

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Mounting image
[==========================100.0%==========================]
The operation completed successfully.


C:\winpe_amd64>dir "\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
 Volume in drive C has no label.
 Volume Serial Number is 1C35-11BE

 Directory of C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs

07/16/2016  05:03 AM         6,166,228 WinPE-WMI.cab
               1 File(s)      6,166,228 bytes
               0 Dir(s)  29,428,953,088 bytes free

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-WMI-Package~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-FMAPI-Package~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-SecureStartup-Package~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-EnhancedStorage-Package~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-WMI-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-Scripting-Package~31bf3856ad364e35~amd64~~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-Scripting-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

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

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Processing 1 of 1 - Adding package WinPE-SecureStartup-Package~31bf3856ad364e35~amd64~en-US~10.0.14393.0
[==========================100.0%==========================]
The operation completed successfully.

C:\winpe_amd64>e:

C:\winpe_amd64>dism /unmount-Wim /mountdir:c:\winpe_amd64\mount /commit

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image File : c:\winpe_amd64\media\sources\boot.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.


C:\winpe_amd64>MakeWinPEMedia /UFD C:\WinPE_amd64 e:
WARNING, ALL DATA ON DISK DRIVE e: WILL BE LOST!
Proceed with Format [Y,N]?Y
Formatting e:...

Setting the boot code on e:...

Copying files to e:...


Success


C:\winpe_amd64>
C:\winpe_amd64>
@PatrickLang
Copy link

Is there a name for forking your own gist because you accidently created an anonymous one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment