huge restructuring

This commit is contained in:
Fierelier 2019-10-06 20:55:29 +02:00
parent de28ee0a6a
commit 2a7cad94f1
29 changed files with 87 additions and 63 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
*.iso
*.iso
disc-image/*

View File

@ -1 +0,0 @@
echo hello world

View File

@ -0,0 +1,5 @@
if not exist %1\"iso" exit /b
echo applying %~n1...
xcopy %1\"iso" "tmp\disc-image" /e /y
echo.
exit /b

View File

@ -0,0 +1,8 @@
if not exist %1\"reg\%~n2" exit /b
echo applying %~n1...
for %%r in (%1\reg\%~n2\*) do (
echo * %%~nr%%~xr...
reg import "%%r"
)
echo.
exit /b

View File

@ -0,0 +1,5 @@
if not exist %1\"script.bat" exit /b
echo applying %~n1...
call %1\"script.bat"
echo.
exit /b

View File

@ -0,0 +1,5 @@
if not exist %1\"wim" exit /b
echo applying %~n1...
xcopy %1\"wim" "tmp\wim" /e /y
echo.
exit /b

View File

@ -1,5 +0,0 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\FWIN_TMP\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"=dword:00000000

View File

@ -1,5 +0,0 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\FWIN_TMP\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config]
"DODownloadMode"=dword:00000000

View File

@ -1,3 +0,0 @@
schtasks /change /tn "\Microsoft\Windows\UpdateOrchestrator\Reboot" /disable
echo. >"%windir%\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot"
echo y| cacls "%windir%\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot" /D "SYSTEM"

View File

@ -1,6 +1,7 @@
@echo off
setlocal EnableDelayedExpansion
set workdir=%~dp0
set tweakdir=%workdir%tweaks
cd /d %workdir%
:: expanding path with prerequisites
@ -9,15 +10,17 @@ for /d %%i in (bin\*) do set path=%cd%\%%i;!path!
:: clearing temporary data
if exist "tmp" (
echo.
echo unmounting windows image...
echo -- unmounting registry --
reg unload HKLM\OPUS-NT_TMP
echo.
echo.
echo -- unmounting windows image --
dism /unmount-image /mountdir:"tmp\wim" /discard
echo.
echo unmounting registry...
reg unload HKLM\FWIN_TMP
echo.
echo removing tmp folder...
echo -- removing tmp folder --
rmdir "tmp" /s /q
)
@ -36,12 +39,14 @@ if "%1" == "console" (
mkdir tmp
echo.
echo extracting disc-image...
echo.
echo -- extracting iso --
mkdir tmp\disc-image
7z x -o"tmp\disc-image" %1
7z x -o"tmp\disc-image" "%1"
echo.
echo mounting windows image...
echo.
echo -- mounting wmi --
mkdir tmp\wim
dism /mount-image /index:1 /imagefile:"tmp\disc-image\sources\install.wim" /mountdir:"tmp\wim"
@ -53,72 +58,71 @@ if "%2" == "console" (
)
echo.
echo applying files to windows image...
for /d %%i in (opus-files\wim\*) do (
echo applying: %%i
xcopy "%%i" "tmp\wim" /e /y
echo.
echo -- applying files to windows image --
for /d %%t in (%tweakdir%\*) do (
call "applyTweakWim.bat" "%%t"
)
echo.
echo working registry...
cd "tmp\wim\windows\system32\config"
for %%i in (*) do (
echo.
echo -- working registry --
for %%r in (tmp\wim\windows\system32\config\*) do (
echo.
echo mounting: %%i
reg load HKLM\FWIN_TMP %%i
echo running tweaks for %%i...
for %%e in (%workdir%\opus-files\reg\%%i\*) do (
echo applying: %%e
reg import "%%e"
echo mounting: %%~nr
reg load HKLM\OPUS-NT_TMP "%%r"
echo.
echo running tweaks for %%~nr...
for /d %%t in (%tweakdir%\*) do (
call "applyTweakReg.bat" "%%t" "%%r"
)
echo unmounting: %%i
reg unload HKLM\FWIN_TMP
echo unmounting: %%r
reg unload HKLM\OPUS-NT_TMP
)
cd /d %workdir%
:: why would the default user settings not be in %windir%\system32\config?
echo.
echo mounting: tmp\wim\users\default\ntuser.dat
reg load HKLM\FWIN_TMP "tmp\wim\Users\Default\NTUSER.DAT"
echo mounting: tmp\wim\Users\Default\NTUSER.DAT
reg load HKLM\OPUS-NT_TMP "tmp\wim\Users\Default\NTUSER.DAT"
echo running tweaks for NTUSER...
for %%e in (%workdir%\opus-files\reg\NTUSER\*) do (
echo applying: %%e
reg import "%%e"
for /d %%t in (%tweakdir%\*) do (
call "applyTweakReg.bat" "%%t" "NTUSER"
)
echo unmounting: tmp\wim\users\default\ntuser.dat
reg unload HKLM\FWIN_TMP
echo unmounting: tmp\wim\Users\Default\NTUSER.DAT
reg unload HKLM\OPUS-NT_TMP
echo.
echo applying scripts...
for /d %%i in (opus-files\scripts\*) do (
echo applying: %%i
call "%%i\script.bat"
echo.
echo -- applying scripts --
for /d %%t in (%tweakdir%\*) do (
call "applyTweakScript.bat" %%t
)
echo.
echo committing changes to wim and unmounting...
echo.
echo -- committing changes to wim and unmounting --
dism /unmount-image /mountdir:"tmp\wim" /commit
echo.
echo applying files to disc-image...
for /d %%i in (opus-files\iso\*) do (
echo applying: %%i
xcopy "%%i" "tmp\disc-image" /e /y
echo.
echo -- applying files to disc-image --
for /d %%t in (%tweakdir%\*) do (
call "applyTweakIso.bat" %%t
)
echo.
echo moving disc-image folder...
echo -- moving disc-image folder --
rmdir "disc-image" /s /q
move "tmp\disc-image" "%cd%"
echo.
echo deleting tmp...
echo -- deleting tmp --
rmdir "tmp" /s /q
echo.
echo all done. a folder with the disc image's data has been created. use something like ntlite to compile it into an iso.
pause
explorer.exe "%cd%\disc-image"
goto exit
:exit

View File

@ -1,7 +1,7 @@
Windows Registry Editor Version 5.00
; this sets the update channel to semi-annual, and additionally defers the updates for half a year
[HKEY_LOCAL_MACHINE\FWIN_TMP\Microsoft\WindowsUpdate\UX\Settings]
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\Microsoft\WindowsUpdate\UX\Settings]
"BranchReadinessLevel"=dword:00000020
"DeferFeatureUpdates"=dword:00000001
"DeferFeatureUpdatesPeriodInDays"=dword:000000b7

View File

@ -1,6 +1,6 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\FWIN_TMP\Policies\Microsoft\Windows\System]
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\Policies\Microsoft\Windows\System]
"AllowCrossDeviceClipboard"=dword:00000000
"EnableActivityFeed"=dword:00000000
"PublishUserActivities"=dword:00000000

View File

@ -1,9 +1,9 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\FWIN_TMP\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSyncProviderNotifications"=dword:00000000 ; no explorer "suggestions"
[HKEY_LOCAL_MACHINE\FWIN_TMP\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
"SystemPaneSuggestionsEnabled"=dword:00000000 ; no start menu "suggestions"
"SoftLandingEnabled"=dword:00000000 ; no "tips", "tricks" and "suggestions"
"SubscribedContent-338393Enabled"=dword:00000000 ; no settings "suggestions"

View File

@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\Policies\Microsoft\Windows\Windows Search]
"AllowCortana"=dword:00000000

View File

@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config]
"DODownloadMode"=dword:00000000

View File

@ -1,5 +1,5 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\FWIN_TMP\Policies\Microsoft\Windows Defender]
[HKEY_LOCAL_MACHINE\OPUS-NT_TMP\Policies\Microsoft\Windows Defender]
"DisableAntiSpyware"=dword:00000001