Fixup typos

This commit is contained in:
Niklas Jeske 2023-02-27 18:29:25 +01:00 committed by GitHub
parent f1e0c41c00
commit 3681d943eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ setlocal EnableExtensions EnableDelayedExpansion
title tiny11 builder alpha
echo Welcome to the tiny11 image creator!
timeout /t 3 /nobreak > nul
timeout /t 3 /nobreak >nul
cls
set tiny11=%HOMEDRIVE%\tiny11
@ -42,6 +42,7 @@ echo Mounting Windows image. This may take a while.
echo.
md %HOMEDRIVE%\scratchdir
dism /mount-image /imagefile:%tiny11%\sources\install.wim /index:%index% /mountdir:%HOMEDRIVE%\scratchdir
cls
echo Mounting complete! Performing removal of applications...
dism /image:%HOMEDRIVE%\scratchdir /Get-ProvisionedAppxPackages | find "PackageName:" | find /V "Microsoft.WindowsStore" | find /V "DesktopAppInstaller" | find /V "Microsoft.HEIFImageExtension" | find /V "Microsoft.HEVCVideoExtension" | find /V "Microsoft.MicrosoftStickyNotes" | find /V "Microsoft.Paint" | find /V "Microsoft.RawImageExtension" | find /V "Microsoft.ScreenSketch" | find /V "Microsoft.SecHealthUI" | find /V "Microsoft.StorePurchaseApp" | find /V "Microsoft.VP9VideoExtensions" | find /V "Microsoft.WebMediaExtensions" | find /V "Microsoft.WebpImageExtension" | find /V "Microsoft.Windows.Photos" | find /V "Microsoft.WindowsCalculator" | find /V "Microsoft.WindowsCamera" | find /V "Microsoft.WindowsNotepad" | find /V "Microsoft.WindowsTerminal" | find /V "Microsoft.XboxIdentityProvider" | find /V "MicrosoftWindows.Client.WebExperience" > %tempfile%.1
@ -53,10 +54,11 @@ dism /image:%HOMEDRIVE%\scratchdir /Get-ProvisionedAppxPackages | find "PackageN
for /f "tokens=*" %%a in (%tempfile%.2) do (
echo Removing %%a
dism /image:%HOMEDRIVE%\scratchdir /Remove-ProvisionedAppxPackage /PackageName:%%a >nul
)
cls
echo Removing of system apps complete! Now proceeding to removal of system packages...
timeout /t 1 /nobreak > nul
cls
timeout /t 1 /nobreak >nul
dism /image:%HOMEDRIVE%\scratchdir /Get-Packages | findstr /C:"Microsoft-Windows-InternetExplorer-Optional-Package" /C:"Microsoft-Windows-Kernel-LA57-FoD-Package" /C:"Microsoft-Windows-InternetExplorer-Optional-Package" /C:"Microsoft-Windows-Kernel-LA57-FoD-Package" /C:"Microsoft-Windows-LanguageFeatures-Handwriting-" /C:"Microsoft-Windows-LanguageFeatures-OCR-" /C:"Microsoft-Windows-LanguageFeatures-Speech-" /C:"Microsoft-Windows-LanguageFeatures-TextToSpeech-" /C:"Microsoft-Windows-MediaPlayer-Package" /C:"Microsoft-Windows-TabletPCMath-Package" /C:"Microsoft-Windows-Wallpaper-Content-Extended-FoD-Package" > %tempfile%.1
> %tempfile%.2 (
for /f "tokens=*" %%a in (%tempfile%.1) do (
@ -66,6 +68,8 @@ dism /image:%HOMEDRIVE%\scratchdir /Get-Packages | findstr /C:"Microsoft-Windows
for /f "tokens=*" %%a in (%tempfile%.2) do (
echo Removing %%a
dism /image:%HOMEDRIVE%\scratchdir /Remove-Package /PackageName:%%a >nul
)
cls
rem echo Removing Edge:
rem rd "%HOMEDRIVE%\scratchdir\Program Files (x86)\Microsoft\Edge" /s /q
@ -75,7 +79,7 @@ takeown /f %HOMEDRIVE%\scratchdir\Windows\System32\OneDriveSetup.exe
icacls %HOMEDRIVE%\scratchdir\Windows\System32\OneDriveSetup.exe /grant Administrators:F /T /C
del /f /q /s "%HOMEDRIVE%\scratchdir\Windows\System32\OneDriveSetup.exe"
echo Removal complete!
timeout /t 2 /nobreak > nul
timeout /t 2 /nobreak >nul
cls
echo Loading registry...
reg load HKLM\zCOMPONENTS "%HOMEDRIVE%\scratchdir\Windows\System32\config\COMPONENTS" >nul
@ -83,7 +87,7 @@ reg load HKLM\zDEFAULT "%HOMEDRIVE%\scratchdir\Windows\System32\config\default"
reg load HKLM\zNTUSER "%HOMEDRIVE%\scratchdir\Users\Default\ntuser.dat" >nul
reg load HKLM\zSOFTWARE "%HOMEDRIVE%\scratchdir\Windows\System32\config\SOFTWARE" >nul
reg load HKLM\zSYSTEM "%HOMEDRIVE%\scratchdir\Windows\System32\config\SYSTEM" >nul
echo Bypassing system requirements(on the system image):
echo Bypassing system requirements (on the system image)
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
@ -94,24 +98,24 @@ echo Bypassing system requirements(on the system image):
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
echo Disabling Teams:
echo Disabling Teams
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" /t REG_DWORD /d "0" /f >nul 2>&1
echo Disabling Sponsored Apps:
echo Disabling Sponsored Apps
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f >nul 2>&1
reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d "{\"pinnedList\": [{}]}" /f >nul 2>&1
echo Enabling Local Accounts on OOBE:
echo Enabling Local Accounts on OOBE
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f >nul 2>&1
copy /y %~dp0autounattend.xml %HOMEDRIVE%\scratchdir\Windows\System32\Sysprep\autounattend.xml
echo Disabling Reserved Storage:
rem copy /y %~dp0autounattend.xml %HOMEDRIVE%\scratchdir\Windows\System32\Sysprep\autounattend.xml
echo Disabling Reserved Storage
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f >nul 2>&1
echo Enabeling drive compression:
echo Enabeling drive compression
reg add "HKLM\zSYSTEM\CurrentControlSet\Policies" /v "Ntfsenablecompression" /t REG_DWORD /d "1" /f >nul 2>&1
echo Disabeling hybernation:
echo Disabeling hybernation
reg add "HKLM\zSYSTEM\CurrentControlSet\Control\Power" /v "HibernateEnabledDefault" /t REG_DWORD /d "0" /f >nul 2>&1
echo Disabling Chat icon:
echo Disabling Chat icon
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v "ChatIcon" /t REG_DWORD /d "3" /f >nul 2>&1
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f >nul 2>&1
echo Tweaking complete!
@ -133,9 +137,9 @@ dism /Export-Image /SourceImageFile:%tiny11%\sources\install.wim /SourceIndex:%i
del %tiny11%\sources\install.wim
ren %tiny11%\sources\install2.wim install.wim
echo Windows image completed. Continuing with boot.wim.
timeout /t 2 /nobreak > nul
timeout /t 2 /nobreak >nul
cls
echo Mounting boot image:
echo Mounting boot image
dism /mount-image /imagefile:%tiny11%\sources\boot.wim /index:2 /mountdir:%HOMEDRIVE%\scratchdir
echo Loading registry...
reg load HKLM\zCOMPONENTS "%HOMEDRIVE%\scratchdir\Windows\System32\config\COMPONENTS" >nul
@ -143,7 +147,7 @@ reg load HKLM\zDEFAULT "%HOMEDRIVE%\scratchdir\Windows\System32\config\default"
reg load HKLM\zNTUSER "%HOMEDRIVE%\scratchdir\Users\Default\ntuser.dat" >nul
reg load HKLM\zSOFTWARE "%HOMEDRIVE%\scratchdir\Windows\System32\config\SOFTWARE" >nul
reg load HKLM\zSYSTEM "%HOMEDRIVE%\scratchdir\Windows\System32\config\SYSTEM" >nul
echo Bypassing system requirements(on the setup image):
echo Bypassing system requirements (on the setup image)
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
@ -154,7 +158,7 @@ echo Bypassing system requirements(on the setup image):
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
echo Tweaking complete!
echo Tweaking complete!
echo Unmounting registry...
reg unload HKLM\zCOMPONENTS >nul 2>&1
reg unload HKLM\zDRIVERS >nul 2>&1
@ -164,7 +168,7 @@ reg unload HKLM\zSCHEMA >nul 2>&1
reg unload HKLM\zSOFTWARE >nul 2>&1
reg unload HKLM\zSYSTEM >nul 2>&1
echo Unmounting image...
dism /unmount-image /mountdir:%HOMEDRIVE%\scratchdir /commit
dism /unmount-image /mountdir:%HOMEDRIVE%\scratchdir /commit
cls
echo the tiny11 image is now completed. Proceeding with the making of the ISO...
rem echo Copying unattended file for bypassing MS account on OOBE...
@ -175,8 +179,8 @@ echo Creating ISO image...
echo Creation completed! Press any key to exit the script...
pause
echo Performing Cleanup...
rd %tiny11% /s /q
rd %HOMEDRIVE%\scratchdir /s /q
rd %tiny11% /s /q
rd %HOMEDRIVE%\scratchdir /s /q
goto :eof
:strip2
@ -184,5 +188,5 @@ echo %2
exit /b 1
:strip3
echo %2
echo %3
exit /b 1