Guest User

Untitled

a guest
Sep 3rd, 2018
184
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SET HOME=%~dp0
  2. SET output=%HOME%\WinPE_amd64
  3. SET TEMP_MOUNT=%HOME%\Mounted_WIM
  4.  
  5. rmdir /Q /S %output%
  6. start copype amd64 %output%
  7. pause
  8.  
  9. cd %output%
  10. copy %HOME%\regfile.reg %output%
  11.  
  12. set WindowsPE=C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs
  13. if not exist %TEMP_MOUNT% md %TEMP_MOUNT%
  14.  
  15. Dism /Mount-Image /ImageFile:C:\Winpe_amd64\media\sources\boot.wim /Index:1 /MountDir:%TEMP_MOUNT%
  16. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\WinPE-WMI.cab"
  17. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\en-us\WinPE-WMI_en-us.cab"
  18. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\WinPE-NetFX.cab"
  19. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\en-us\WinPE-NetFX_en-us.cab"
  20. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\WinPE-Scripting.cab"
  21. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\en-us\WinPE-Scripting_en-us.cab"
  22. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\WinPE-PowerShell.cab"
  23. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\en-us\WinPE-PowerSHell_en-us.cab"
  24. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\WinPE-StorageWMI.cab"
  25. Dism /Add-Package /Image:%TEMP_MOUNT% /PackagePath:"%WindowsPE%\en-us\WinPE-StorageWMI_en-us.cab"
  26.  
  27. #copy C:\windows\system32\iscsicli.exe %TEMP_MOUNT%\windows\system32
  28. #copy C:\windows\system32\iscsicpl.dll %TEMP_MOUNT%\windows\system32
  29. #copy C:\windows\system32\iscsicpl.exe %TEMP_MOUNT%\windows\system32
  30. #copy C:\windows\system32\iscsidsc.dll %TEMP_MOUNT%\windows\system32
  31. #copy C:\windows\system32\iscsied.dll %TEMP_MOUNT%\windows\system32
  32. #copy C:\windows\system32\iscsiexe.dll %TEMP_MOUNT%\windows\system32
  33. #copy C:\windows\system32\iscsilog.dll %TEMP_MOUNT%\windows\system32
  34. #copy C:\windows\system32\iscsium.dll %TEMP_MOUNT%\windows\system32
  35. #copy C:\windows\system32\iscsiwmi.dll %TEMP_MOUNT%\windows\system32
  36. #copy C:\windows\system32\Drivers\msiscsi.sys %TEMP_MOUNT%\windows\system32
  37.  
  38. #copy C:\windows\system32\de-de\iscsicli.exe.mui %TEMP_MOUNT%\windows\system32\de-de
  39. #copy C:\windows\system32\de-de\iscsicpl.dll.mui %TEMP_MOUNT%\windows\system32\de-de
  40. #copy C:\windows\system32\de-de\iscsicpl.exe.mui %TEMP_MOUNT%\windows\system32\de-de
  41. #copy C:\windows\system32\de-de\iscsidsc.dll.mui %TEMP_MOUNT%\windows\system32\de-de
  42. #copy C:\windows\system32\de-de\iscsiexe.dll.mui %TEMP_MOUNT%\windows\system32\de-de
  43. #copy C:\windows\system32\de-de\iscsilog.dll.mui %TEMP_MOUNT%\windows\system32\de-de
  44. #
  45. #copy C:\windows\system32\de-de\iscsicpl.dll.mui %TEMP_MOUNT%\windows\system32\en-us
  46. #copy C:\windows\system32\de-de\iscsicpl.exe.mui %TEMP_MOUNT%\windows\system32\en-us
  47.  
  48. Dism /Get-Packages /Image:%TEMP_MOUNT%
  49. REG LOAD HKLM\PE_Sys %TEMP_MOUNT%\Windows\System32\config\SYSTEM
  50. REG LOAD HKLM\PE_Soft %TEMP_MOUNT%\Windows\System32\config\SOFTWARE
  51.  
  52. #regedit regfile.reg
  53.  
  54. pause
  55. REG UNLOAD HKLM\PE_Sys
  56. REG UNLOAD HKLM\PE_Soft
  57. Dism /Unmount-Image /MountDir:%TEMP_MOUNT% /commit
  58. MakeWinPEMedia /ISO %output% %HOME%\winpe_amd64.iso
  59. cd %HOME%
RAW Paste Data