Skip to content

Commit

Permalink
New batches, fix of sku-auto-selection and now batch using psexec.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
Skulltrail192 committed Aug 4, 2023
1 parent c73a8bd commit ac9fe99
Show file tree
Hide file tree
Showing 16 changed files with 136 additions and 36 deletions.
Binary file added Build New Setup Windows Environment.exe
Binary file not shown.
Binary file removed Build New Windows ISO.lnk
Binary file not shown.
41 changes: 41 additions & 0 deletions Deployment/build-without-patch.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@echo off

cd /D %~dp0

cls

TITLE Windows Build New Setup Environment


if not exist "Sources\DVD\sources\boot.wim" (
ECHO PHASE: Begin Build
ECHO You must need place Windows DVD contents on "Sources\DVD\sources"
pause
call choose-action-dvd-folder-empty.bat
)

REM Set Env Variables if not setted before
if "%setenv%" == "" (
call setenv.bat
)

REM Select drive-letter
call set-drive-letter.bat

REM Clean disk drive for pnf and log files
call prepare-drive.bat

REM Choose method to select sku
call sku-selection-method.bat

REM capture image
call choose-capture-image.bat

REM create iso
call make-iso.bat

cls

ECHO PHASE: Finished Build

ECHO Finished on %DATE% at %TIME%
10 changes: 7 additions & 3 deletions Deployment/build.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
@echo off

cd %~dp0
cd /D %~dp0

cls

TITLE Windows Build New Setup Environment


if not exist "Sources\DVD\sources\boot.wim" (
ECHO PHASE: Begin Build
ECHO You must need place Windows DVD contents on "Sources\DVD\sources"
pause
exit
call choose-action-dvd-folder-empty.bat
)

REM Set Env Variables if not setted before
Expand All @@ -19,7 +23,7 @@ REM Select drive-letter
call set-drive-letter.bat

REM Clean disk drive for pnf and log files
call clean-drive.bat
call prepare-drive.bat

REM Choose method to select sku
call sku-selection-method.bat
Expand Down
25 changes: 25 additions & 0 deletions Deployment/choose-action-dvd-folder-empty.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off

cls

ECHO PHASE: Begin Build
ECHO Please choose if you want capure a new image or append to exiting image:
ECHO.
ECHO 1.Copy DVD content from mounted ISO or DVD drive;
ECHO 2.Extract DVD content from ISO placed on Input/ISO folder
ECHO 3.Do nothing
ECHO.


set /p a=Type option:
IF %a%==1 (
call copy-content-drive.bat
goto :EOF
)
IF %a%==2 (
call extract-iso.bat
goto :EOF
)
IF %a%==3 (
exit
)
1 change: 1 addition & 0 deletions Deployment/clean-drive.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ECHO Cleanning some files from drive

del "%letter%:\Windows\OEWABLog.txt" >nul 2>nul
del "%letter%:\Windows\setuplog.txt" >nul 2>nul
del "%letter%:\Windows\SchedLgU.txt" >nul 2>nul

rmdir /s /q ""%letter%:\Windows\Panther" >nul 2>nul

Expand Down
42 changes: 13 additions & 29 deletions Deployment/clean-enum-hardware.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,24 @@

cls

REM ECHO PHASE: Cleannig Drive
if "%setenv%" == "" (
call setenv.bat
)

REM if "%setenv%" == "" (
REM call setenv.bat
REM )
if "%letter%" == "" (
call set-drive-letter.bat
)

REM if "%letter%" == "" (
REM call set-drive-letter.bat
REM )
ECHO PHASE: Cleannig Hardware Infomation Drive

REM cls

REM if not exist "%letter%:\Program Files" (
REM cls
REM ECHO PHASE: Clean Drive
REM ECHO The drive is not mounted or not a Windows/Reactos compatible installation
REM pause
REM goto :EOF
REM )

cls

ECHO PHASE: Cleannig Drive

reg load HKLM\TempSytem "%~dp0Temp\SYSTEM" >nul
"%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum" -ot reg -actn setowner -ownr n:Administrators
"%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum" -ot reg -actn ace -ace "n:Administrators;p:full"
reg load HKLM\TempSytem "%letter%:\Windows\System32\config\system" >nul
REM "%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum" -ot reg -actn setowner -ownr n:Administrators
REM "%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum" -ot reg -actn ace -ace "n:Administrators;p:full"
REM "%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet002\Enum" -ot reg -actn setowner -ownr n:Administrators
REM "%~dp0tools\SetAcl\SetACL.exe" -on "HKEY_LOCAL_MACHINE\TempSytem\ControlSet002\Enum" -ot reg -actn ace -ace "n:Administrators;p:full"
REM "%~dp0tools\SetAcl\subinacl\subinacl.exe" /keyreg HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum /grant=Administrators

REM reg delete HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum /f
REM reg delete HKEY_LOCAL_MACHINE\TempSytem\ControlSet002\Enum /f

reg unload HKLM\TempSytem >nul
reg delete HKEY_LOCAL_MACHINE\TempSytem\ControlSet001\Enum /f
reg delete HKEY_LOCAL_MACHINE\TempSytem\ControlSet002\Enum /f

pause
reg unload HKLM\TempSytem >nul
3 changes: 2 additions & 1 deletion Deployment/copy-content-drive.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ set /p driveLetter=Type driver letter:

if not exist "%driveLetter%:\Sources" (
ECHO You choose a invalid drive sources. Run Command again and choose a valid drive with Windows DVD content:
goto :EOF
pause
exit
)

cls
Expand Down
2 changes: 1 addition & 1 deletion Deployment/copy-patched-bins.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cls

ECHO PHASE: Copying patched WinSetup to Boot WIM
ECHO PHASE: Copying patched WinSetup to Boot WIM

if exist "%~dp0Boot\Setup\sources" (
"%~dp0tools\takeown\%ARCH%\takeown.exe" /F "%~dp0Boot\Setup\sources\winsetup.dll" /A >nul
Expand Down
2 changes: 1 addition & 1 deletion Deployment/make-iso.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if "%TARGETISO%" == "" (
set TARGETISO=Windows
)

del /f "%~dp0Output\ISO\%TARGETISO%.iso" >nul
del /f "%~dp0Output\ISO\%TARGETISO%.iso"

if exist "%~dp0Sources\DVD\efi\microsoft\boot\efisys.bin" (
"%~dp0tools\Oscdimg\%ARCH%\oscdimg.exe" -l"%TARGETISO%" -m -oc -u2 -udfver102 -bootdata:2#p0,e,b"%~dp0Sources\DVD\boot\etfsboot.com"#pEF,e,b"%~dp0Sources\DVD\efi\microsoft\boot\efisys.bin" "%~dp0Sources\DVD" "%~dp0Output\ISO\%TARGETISO%.iso"
Expand Down
23 changes: 23 additions & 0 deletions Deployment/prepare-capture-drive.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off

cls

if "%setenv%" == "" (
call setenv.bat
)

if "%letter%" == "" (
call set-drive-letter.bat
)

ECHO PHASE: Preparing Drive

REM Clean disk drive for pnf and log files
call clean-drive.bat

call clean-enum-hardware.bat

REM Set Inf of Windows Drive Unhide like Server 2003+ Windows
attrib -H /S /D /L %letter%:\Windows\inf

call capture-image.bat
21 changes: 21 additions & 0 deletions Deployment/prepare-drive.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off

cls

if "%setenv%" == "" (
call setenv.bat
)

if "%letter%" == "" (
call set-drive-letter.bat
)

ECHO PHASE: Preparing Drive

REM Clean disk drive for pnf and log files
call clean-drive.bat

call clean-enum-hardware.bat

REM Set Inf of Windows Drive Unhide like Server 2003+ Windows
attrib -H /S /D /L %letter%:\Windows\inf
2 changes: 1 addition & 1 deletion Deployment/sku-auto-selection.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cls

if exist "%letter%:\Windows\Professional.xml" (
if %GUESTARCH% == x86 (
SET TARGETISO=WXPFPP_EN
SET TARGETISO=WXPFPP_EN
SET Description=Windows XP Professional Edition
)
if %GUESTARCH% == x64 (
Expand Down
Binary file added Deployment/tools/psexec/psexec.exe
Binary file not shown.
Binary file removed Development Tools.lnk
Binary file not shown.
Binary file added Development-Cli.exe
Binary file not shown.

0 comments on commit ac9fe99

Please sign in to comment.