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

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

View File

@ -1,7 +1,7 @@
Windows Registry Editor Version 5.00 Windows Registry Editor Version 5.00
; this sets the update channel to semi-annual, and additionally defers the updates for half a year ; 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 "BranchReadinessLevel"=dword:00000020
"DeferFeatureUpdates"=dword:00000001 "DeferFeatureUpdates"=dword:00000001
"DeferFeatureUpdatesPeriodInDays"=dword:000000b7 "DeferFeatureUpdatesPeriodInDays"=dword:000000b7

View File

@ -1,6 +1,6 @@
Windows Registry Editor Version 5.00 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 "AllowCrossDeviceClipboard"=dword:00000000
"EnableActivityFeed"=dword:00000000 "EnableActivityFeed"=dword:00000000
"PublishUserActivities"=dword:00000000 "PublishUserActivities"=dword:00000000

View File

@ -1,9 +1,9 @@
Windows Registry Editor Version 5.00 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" "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" "SystemPaneSuggestionsEnabled"=dword:00000000 ; no start menu "suggestions"
"SoftLandingEnabled"=dword:00000000 ; no "tips", "tricks" and "suggestions" "SoftLandingEnabled"=dword:00000000 ; no "tips", "tricks" and "suggestions"
"SubscribedContent-338393Enabled"=dword:00000000 ; no settings "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 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 "DisableAntiSpyware"=dword:00000001