Delete key
slmgr.vbs -upk
Reinstall key file
slmgr.vbs -rilc
Add key
slmgr.vbs -ipk GCRJD-8NW9H-F2CDX-CCM8D-9D6T9 (Pro)
slmgr.vbs -ipk HMCNV-VVBFX-7HMBH-CTY9B-B4FXY (Pro N)
slmgr.vbs -ipk MHF9N-XY6XB-WVXMC-BTDCT-MKKG7 (Enter)
slmgr.vbs -ipk TT4HM-HN7YT-62K67-RGRQJ-JFFXW (Enter N)
Add server KMS
slmgr.vbs -skms cckms.nccu.edu.tw
slmgr.vbs -skms kms.isu.edu.tw
slmgr.vbs -skms win81.no-ip.org
slmgr.vbs -skms vhk.3322.org
Delete server KMS
slmgr.vbs -ckms
Active
slmgr.vbs -ato
Test
slmgr.vbs -xpr
slmgr.vbs -dlv
Windows 8.1 Build 9600 RTM
Core : 334NH-RXG76-64THK-C7CKG-D3VPT
Professional : XHQ8N-C3MCJ-RQXB6-WCHYG-C9WKB
MICROSOFT.WINDOWS.8.1.RTM.X86.Core & Pro.ENGLISH.DVD-WZT
RELEASE DATE: 08/21/2013
SHA-1: 802CFCD3A411D99C097EA7E747F0B6697F9BDAC4
MD5: 7DD36FEA0D004ACFEDBDB3A5521EF5FF
MICROSOFT.WINDOWS.8.1.RTM.X64.Core & Pro.ENGLISH.DVD-WZT
RELEASE DATE: 08/21/2013
SHA-1: BC2F7FF5C91C9F0F8676E39E703085C65072139B
MD5: F104B78019E86E74B149AE5E510F7BE9
MICROSOFT.WINDOWS.8.1.ENTERPRISE.RTM.X86.VOLUME.ENGLISH.DVD-WZT
RELEASE DATE: 08/21/2013
SHA-1: 87DBCDB8491DBEF1BBC14BE8AB599086789E143C
MD5: 405091EFE4D58947DB45A106B37DD064
MICROSOFT.WINDOWS.8.1.ENTERPRISE.RTM.X64.VOLUME.ENGLISH.DVD-WZT
RELEASE DATE: 08/21/2013
SHA-1: 8311958EDDEDD29E326ED91FDF025D39B88E0FC8
MD5: 2A9589AEEFDC4B94CD527476FA979EE5
MICROSOFT.WINDOWS.8.1.PROFESSIONAL.RTM.X86.VOLUME.WITH.ROLLUP-1.ENGLISH.DVD-WZT
RELEASE DATE: 10/17/2013
SHA-1: 9F1FCEC3B267EDB6F3BD02566BC889BB4A372BFD
MD5: 49B428D6FB1A1E53C0682AED76664C2B
MICROSOFT.WINDOWS.8.1.PROFESSIONAL.RTM.X64.VOLUME.WITH.ROLLUP-1.ENGLISH.DVD-WZT
RELEASE DATE: 10/17/2013
SHA-1: CFCDF895679A5116F7F1C6406C20F99A1F850E49
MD5: F9AC831F06A760C722DF0DF34F1B9397
MICROSOFT.WINDOWS.8.1.ENTERPRISE.RTM.X86.WITH.ROLLUP-1.ENGLISH.DVD-WZT
RELEASE DATE: 10/17/2013
SHA-1: 5EFB981C94E1223C85F3BB504D04E0642A85C1D4
MD5: BF620A67B5DDA1E18E9CE17D25711201
MICROSOFT.WINDOWS.8.1.ENTERPRISE.RTM.X64.WITH.ROLLUP-1.ENGLISH.DVD-WZT
RELEASE DATE: 10/17/2013
SHA-1: AE792B2EF982DAC7391224B624EAB8D6340D78AB
MD5: 8E194185FCCE4EA737F274EE9005DDF0
KMS_VL_ALL-WinDivert-1.1.0RC-v1
All files in the same folder
Activate.cmd
FakeClient.exe
KMS Server.exe
WdfCoInstaller01009.dll
WinDivert.dll
WinDivert.inf
WinDivert.sys
[ Activate.cmd ]
@echo off
title FakeClient 1.1.0RC-v1
color 1F
sc stop windivert1.0 >nul
sc delete windivert1.0 >nul
sc stop windivert1.1 >nul
sc delete windivert1.1 >nul
netsh interface set interface name="Ethernet" admin=disabled
pushd "%~dp0"
set port=1688
set kmsip=1.0.0.0
set AI=43200
set RI=43200
set epid=RandomKMSPID
cscript //B "%windir%\system32\slmgr.vbs" /skms 1.0.0.0:1688 >nul
netsh advfirewall firewall add rule name="BLOCK" protocol=any dir=out remoteip=65.52.98.231,65.52.98.232,65.52.98.233 action=block >nul
netsh advfirewall firewall add rule name="ANY_NAME" dir=in localport=1688 protocol=TCP action=allow remoteip=any >nul
netsh advfirewall firewall add rule name="ANY_NAME" dir=out localport=1688 protocol=TCP action=allow remoteip=any >nul
route -f
route add %kmsip% 0.0.0.0 IF 1
start /b FakeClient.exe %kmsip%
start /b cmd /c "KMS Server.exe"
cscript //B "%windir%\system32\slmgr.vbs" /ipk Must Put Serial Here
slmgr.vbs /ato
taskkill /t /f /IM "KMS Server.exe" >nul
taskkill /t /f /IM FakeClient.exe >nul
netsh advfirewall reset >nul
route delete %kmsip% 0.0.0.0
cscript //B "%windir%\system32\slmgr.vbs" /ckms
netsh interface set interface name="Ethernet" admin=enabled
https://labalec.fr/erwan/?p=1115
[ bcdedit batch ]
@echo off
setlocal
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\temp\BCD
del %BCDSTORE% /F
rem create - rem if not needed
%BCDEDIT% /createstore %BCDSTORE%
rem create bootmgr entry
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
ECHO _________________________________________
ECHO BCDEDIT Main Menu
ECHO.
ECHO Menu Choices
ECHO.
ECHO 1 Add Win7
ECHO 2 Add VHDBOOT
ECHO 3 Add Grub4Dos
ECHO 4 Add Winpe
ECHO 5 Add RamDisk
ECHO 6 Add NTLDR
echo -
ECHO 9 Exit
ECHO _________________________________________
ECHO.
SET /P userChoice=ENTER OPTION:
if %userChoice% == 1 GOTO win7
if %userChoice% == 2 GOTO vhdboot
if %userChoice% == 3 GOTO g4d
if %userChoice% == 4 GOTO winpe
if %userChoice% == 5 GOTO ramdisk
if %userChoice% == 6 GOTO ntdlr
if %userChoice% == 9 GOTO QUITMENU
:win7
rem add new windows7 entry
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof
:ntdlr
%BCDEDIT% /store %BCDSTORE% /create {ntldr}
%BCDEDIT% /store %BCDSTORE% /set {ntldr} device partition=C:
%BCDEDIT% /store %BCDSTORE% /set {ntldr} path \ntldr
%BCDEDIT% /store %BCDSTORE% /set {ntldr} description "Windows XP"
%BCDEDIT% /store %BCDSTORE% /displayorder {ntldr} /addlast
goto :eof
:vhdboot
rem add new vhd boot entry
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device vhd=[C:]\disk.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice vhd=[C:]\disk.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7 VHDBOOT"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof
:g4d
rem add grub4dos
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% path \grldr.mbr
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Grub4dos"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof
:winpe
rem add winpe
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
goto :eof
:ramdisk
rem add ramdisk
%BCDEDIT% /store %BCDSTORE% /create {ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
goto :eof
:eof
echo "this is the end..."
https://diddy.boot-land.net/bcdedit/files/examples1.htm
Create a new (empty) store
Create {bootmgr} entry
Create entry for Windows Vista/7
Create {ntldr} entry
Create entry for VHD boot
Create entry for Grub4dos
Create {ramdiskoptions} entry
Create entry for WinPE
Using multiple {ramdiskoptions}
[ Create a new (empty) store ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
%BCDEDIT% /createstore %BCDSTORE%
endlocal
pause
[ Create {bootmgr} entry ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
endlocal
pause
[ Create entry for Windows Vista/7 ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid=%%A
%BCDEDIT% /store %BCDSTORE% /set %guid% device partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice partition=C:
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
endlocal
pause
[ Create {ntldr} entry ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
%BCDEDIT% /store %BCDSTORE% /create {ntldr}
%BCDEDIT% /store %BCDSTORE% /set {ntldr} device partition=C:
%BCDEDIT% /store %BCDSTORE% /set {ntldr} path \ntldr
%BCDEDIT% /store %BCDSTORE% /set {ntldr} description "Windows XP"
%BCDEDIT% /store %BCDSTORE% /displayorder {ntldr} /addlast
endlocal
pause
[ Create entry for VHD boot ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid=%%A
%BCDEDIT% /store %BCDSTORE% /set %guid% device vhd=[C:]\vhd\seven.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice vhd=[C:]\vhd\seven.vhd
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows 7 VHD"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
endlocal
pause
[ Create entry for Grub4dos ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application bootsector') do set guid=%%A
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% path \grldr.mbr
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Grub4dos"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
endlocal
pause
[ Create {ramdiskoptions} entry ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
%BCDEDIT% /store %BCDSTORE% /create {ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
endlocal
pause
[ Create entry for WinPE ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid=%%A
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions}
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
endlocal
pause
[ Using multiple {ramdiskoptions} ]
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE=C:\Boot\BCD
::___________________________________
for /f "tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk=%%A
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice partition=C:
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\different.sdi
for /f "Tokens=3" %%A in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID=%%A
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[C:]\Sources\boot.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[C:]\Sources\boot.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "Windows PE"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
endlocal
pause
https://diddy.boot-land.net/bcdedit/
https://diddy.boot-land.net/bcdedit/files/examples1.htm
https://mistype.reboot.pro/mistype.docs/readme.files/multiboot.htm
[ BIOS Entries ]
After creating the BIOS BCD store it should be copied to the \boot folder.
The first step is to create a new BCD store
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
%BCDEDIT% /createstore %BCDSTORE%
echo.
endlocal
pause
Now add an entry for bootmgr
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
echo.
endlocal
pause
Add an entry for x86.wim
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
ECHO Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Add an entry for x64.wim
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
ECHO Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Add an entry for a Flat Boot WinPE
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Now putting this all together in one script
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Creating BCD Store...
%BCDEDIT% /createstore %BCDSTORE%
Echo Adding {bootmgr} entry...
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
https://mistype.reboot.pro/mistype.docs/readme.files/bcd.bios.txt
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Creating BCD Store...
%BCDEDIT% /createstore %BCDSTORE%
Echo Adding {bootmgr} entry...
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.exe
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (BIOS)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
[ UEFI Entries ]
After creating the UEFI BCD store it should be copied to the \EFI\Microsoft\boot folder.
The first step is to create a new BCD store
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
%BCDEDIT% /createstore %BCDSTORE%
echo.
endlocal
pause
Now add an entry for bootmgr
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
echo.
endlocal
pause
Add an entry for x86.wim
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
ECHO Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Add an entry for x64.wim
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
ECHO Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Add an entry for a Flat Boot WinPE
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
Now putting this all together in one script
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Creating BCD Store...
%BCDEDIT% /createstore %BCDSTORE%
Echo Adding {bootmgr} entry...
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
https://mistype.reboot.pro/mistype.docs/readme.files/bcd.uefi.txt
@echo off
setlocal
:: Do not use spaces in paths and do
:: NOT wrap in quotes
set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe
set BCDSTORE="%~dp0BCD"
::___________________________________
Echo Creating BCD Store...
%BCDEDIT% /createstore %BCDSTORE%
Echo Adding {bootmgr} entry...
%BCDEDIT% /store %BCDSTORE% /create {bootmgr}
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} description "Boot Manager"
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} device boot
%BCDEDIT% /store %BCDSTORE% /set {bootmgr} timeout 20
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x86.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "32-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Creating ramdisksdidevice entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /device') do set ramdisk={%%g}
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdidevice boot
%BCDEDIT% /store %BCDSTORE% /set %ramdisk% ramdisksdipath \boot\boot.sdi
Echo Adding RAM Boot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set GUID={%%g}
%BCDEDIT% /store %BCDSTORE% /set %GUID% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %GUID% detecthal Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% winpe Yes
%BCDEDIT% /store %BCDSTORE% /set %GUID% osdevice ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% device ramdisk=[boot]\sources\x64.wim,%ramdisk%
%BCDEDIT% /store %BCDSTORE% /set %GUID% path \windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %GUID% description "64-bit Windows PE RAMBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
Echo Adding FlatBoot WinPE entry...
for /f "tokens=2 delims={}" %%g in ('%BCDEDIT% /store %BCDSTORE% /create /application osloader') do set guid={%%g}
%BCDEDIT% /store %BCDSTORE% /set %guid% path \Windows\system32\winload.efi
%BCDEDIT% /store %BCDSTORE% /set %guid% device boot
%BCDEDIT% /store %BCDSTORE% /set %guid% osdevice boot
%BCDEDIT% /store %BCDSTORE% /set %guid% systemroot \Windows
%BCDEDIT% /store %BCDSTORE% /set %guid% description "Windows PE FLATBoot (UEFI)"
%BCDEDIT% /store %BCDSTORE% /set %guid% winpe yes
%BCDEDIT% /store %BCDSTORE% /set %guid% detecthal yes
%BCDEDIT% /store %BCDSTORE% /displayorder %guid% /addlast
echo.
endlocal
pause
[ Modify the BCD entry ]
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum | find "osdevice"
{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} device ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} osdevice ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} description "WinPE 5.0 x86"
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /copy {default} /d "WinPE 5.0 x64"
{c449d072-26f3-11e3-af16-00155da12e2b}
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {c449d072-26f3-11e3-af16-00155da12e2b} device ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {c449d072-26f3-11e3-af16-00155da12e2b} osdevice ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit.exe /store C:\Tmp\WinPE50_Combined\Boot\BCD /deletevalue {default} bootmenupolicy
https://reboot.pro/topic/19156-create-a-bootable-winpe-50-x64-usb-drive/
diskpart
list disk
select disk #
clean
create par primary
select par 1
active
format quick fs=fat32
assign
exit
wpeinit
@echo off
for %%p in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%p:Qdir set w=%%p
call %w%:Qdir\Q-dir.exe
"RunAs"="Interactive User"
winlogon.exe
4D0069006E0069004E005400
https://www.wingwy.com/archives/2011_02_862.html
winpeshl.exe
[ winpeshl.ini ]
[LaunchApps]
wpeinit.exe /unattend=X:\Users\Default\Documents\init.xml
ux.exe
X:\windows\explorer.exe
wpeutil shutdown
wpeutil reboot
wpeutil CreatePageFile /path=C:\pagefile.sys
wpeutil DisableFirewall
wpeutil Enablefirewall
<Display>
<ColorDepth>%InstallationParameters.ColorDepth%</ColorDepth>
<DPI>%InstallationParameters.DPI%</DPI>
<HorizontalResolution>%InstallationParameters.HorizontalResolution%</HorizontalResolution>
<VerticalResolution>%InstallationParameters.VerticalResolution%</VerticalResolution>
<RefreshRate>%InstallationParameters.RefreshRate%</RefreshRate>
</Display>
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
[ Complete sample ]
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="https://schemas.microsoft.com/WMIConfig/2002/State">
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
</component>
</settings>
</unattend>