Restructured and added buildScript
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
PEBuilderConfig.cmd
|
||||||
|
*.iso
|
||||||
|
*.wim
|
||||||
57
Build_WinPE-ToolKit.cmd
Normal file
57
Build_WinPE-ToolKit.cmd
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
@echo off
|
||||||
|
REM ElevationCheck
|
||||||
|
NET SESSION >nul 2>&1
|
||||||
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
ECHO Please run this script as administrator
|
||||||
|
PAUSE
|
||||||
|
EXIT
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Buildconf
|
||||||
|
set BuildEdition=PEToolkit
|
||||||
|
|
||||||
|
REM Setup Enviroment
|
||||||
|
REM Check if home has PEBuilderConfig if not check the current folder when no config was found quit
|
||||||
|
IF EXIST "%UserProfile%\PEBuilderConfig.cmd" (
|
||||||
|
call %UserProfile%\PEBuilderConfig.cmd
|
||||||
|
) ELSE (
|
||||||
|
IF EXIST "%~dp0\PEBuilderConfig.cmd" (
|
||||||
|
call "%~dp0\PEBuilderConfig.cmd"
|
||||||
|
) ELSE (
|
||||||
|
echo Config not found, exiting
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
)
|
||||||
|
call "%ADKPath%\Deployment Tools\DandISetEnv.bat"
|
||||||
|
set PEPath=C:\WinPE_%BuildEdition%
|
||||||
|
|
||||||
|
REM Prepeare PE
|
||||||
|
call copype amd64 %PEPath%
|
||||||
|
|
||||||
|
REM Mount WIM image
|
||||||
|
Dism /Mount-Image /ImageFile:"%PEPath%\media\sources\boot.wim" /index:1 /MountDir:"%PEPath%\mount"
|
||||||
|
|
||||||
|
REM Add PE-ToolkitFiles
|
||||||
|
rem xcopy /E /I /H /Y "%~dp0Overlay\PE-ToolKit" "%PEPath%\mount\PE-ToolKit"
|
||||||
|
takeown /a /f "%PEPath%\mount\Windows\System32\winpe.jpg"
|
||||||
|
icacls "%PEPath%\mount\Windows\System32\winpe.jpg" /grant *S-1-1-0:F
|
||||||
|
xcopy /E /I /H /Y "%~dp0Overlay" "%PEPath%\mount"
|
||||||
|
|
||||||
|
REM Unmount WIM image
|
||||||
|
Dism /Unmount-Image /MountDir:"%PEPath%\mount" /commit
|
||||||
|
Dism /Cleanup-Mountpoints
|
||||||
|
|
||||||
|
REM Create ISO
|
||||||
|
call MakeWinPEMedia /ISO %PEPath% "%~dp0Winpe%ADKVersion%_%BuildEdition%.iso"
|
||||||
|
|
||||||
|
REM Copy WIM File to output folder
|
||||||
|
echo Saving %~dp0Winpe%ADKVersion%_%BuildEdition%.wim
|
||||||
|
copy %PEPath%\media\sources\boot.wim %~dp0Winpe%ADKVersion%_%BuildEdition%.wim
|
||||||
|
|
||||||
|
REM remove BuildDir
|
||||||
|
rmdir /q /s %PEPath%
|
||||||
|
|
||||||
|
REM end
|
||||||
|
echo Done
|
||||||
|
pause
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
TITLE WinPE Toolkit
|
||||||
REM ##################################################################
|
REM ##################################################################
|
||||||
REM # #
|
REM # #
|
||||||
REM # @description: #
|
REM # @description: #
|
||||||
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
2
PEBuilderConfig.cmd.example
Normal file
2
PEBuilderConfig.cmd.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
set ADKPath=C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit
|
||||||
|
set ADKVersion=W10
|
||||||
Reference in New Issue
Block a user