Skip to content

Commit

Permalink
v0.92
Browse files Browse the repository at this point in the history
Completed some tests with automatic installations. Bundled a small script with this tool to modify installation media.
  • Loading branch information
TheMMC committed Apr 9, 2024
1 parent 007e403 commit fb87424
Show file tree
Hide file tree
Showing 24 changed files with 4,223 additions and 11 deletions.
4 changes: 2 additions & 2 deletions english/In-Place_Upgrade_Helper.bat
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pause>nul|set/p=&echo(
:mainmenu
cls
ECHO M-M-C's quick-n-dirty In-Place-Upgrade-Helper for Win10/11
echo V0.91
echo V0.92
echo.
echo Enter the number of your desired edition, press enter, choose an upgrade method, then press enter again.
echo.
Expand Down Expand Up @@ -226,7 +226,7 @@ goto endofbatch
:nosetupfound
echo Setup.exe and/or Sources folder not found! Tool not copied to the installation files?
echo Trying to use an external installation medium...
set /p sourcespath=Please enter the path to the installation medium (e.g. F:\ or D:\unpackesISO\):
set /p sourcespath=Please enter the path to the installation medium (e.g. F:\ or D:\unpackedISO\):
goto premainmenu

:nokeyselected
Expand Down
12 changes: 8 additions & 4 deletions english/In-Place_Upgrade_Helper_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,18 @@ The same of course also applies to Server 2022/2025.
Windows 10 Enterprise LTSC 2021 (and IoT/N) were tested with de-de_windows_10_enterprise_ltsc_2021_x64_dvd_71796d33.iso.

BONUS:
The folder "[optional]" contains a file that can be used to modify your installation medium for clean installations. Just copy EI.CFG to the sources folder.
If you boot from the installation medium the EI.CFG enforces the setup to let you choose your edition for a clean installation, even if a license is found in the firmware. For example this can be useful to install Enterprise on a PC that came pre-installed with Home.
While doing a clean install only the actually existing editions on the installation medium are shown, not the edition that can be generated. Generating addition edtions is only possible with an in-place-upgrade.
The folder "[optional_install_media_mods]" contains a script to deactivate any installation requirements like TPM or secure boot.
Additional info for EI.CFG: While doing a clean install only the actually existing editions on the installation medium are shown, not the edition that can be generated. Generating addition edtions is only possible with an in-place-upgrade.

Also don't use an autounattend.xml or any other installation automation, this will break this tool!
ONLY sources\$OEM$\$$\Panther\unattend.xml IS SUPPORTED!
autounattend.xml in root folder or similar breaks In-Place_Upgrade_Helper.bat!


Changelog:
v0.92
Did some tests with unattend.xml and autounattend.xml. Anything besides sources\$OEM$\$$\Panther\ breaks this tool, and that gave me some problems with some TPM-requirement workarounds...
So I wrote a small extra script to modify the Windows installation files. Obviously this only works with extracted ISOs and USB-sticks, not mounted ISOs.

v0.91
Small changes to the main menu.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
@echo off

Rem Get admin rights
>nul 2>&1 fsutil dirty query %systemdrive% && (goto gotAdmin) || (goto UACPrompt)
:UACPrompt
if exist "%SYSTEMROOT%\System32\Cscript.exe" (
echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~s0", "", "", "runas", 1 > "%temp%\getadmin.vbs"
cscript //nologo "%temp%\getadmin.vbs"
exit /b
) else (
powershell -Command "Start-Process -Verb RunAs -FilePath '%~s0'"
exit /b
)
:gotAdmin
if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
pushd "%CD%" && CD /D "%~dp0"

if not defined iammaximized (
set iammaximized=1
start /max "" "%0" "%*"
exit
)

cls
Echo If this windows is not maximized please change the size manually.
echo This is a know bug in Windows Terminal.
echo.
echo.
SETLOCAL
:premainmenu
echo This script does the following:
echo -copy EI.CFG to force the setup to let you choose your edition for a clean installation, even if a license is found in the firmware
echo -remove installation requirements such as TPM or secure boot by adding the appropriate registry keys to boot.wim
echo -remove MS-account requirements, even for Windows Home. Just disconnect internet during setup.
echo -copy a souped up unattend.xml to sources\$OEM$\$$\Panther that does the following after the first boot:
echo -remove installation requirements such as TPM or secure boot by adding the appropriate registry keys to Windows
echo -disable ads, suggestions, recommendations and auto-installation of apps (Spotify, Candy Crush, MS Teams etc.) for new users
echo (in case of a clean install this applies to all users)
echo.
echo Everything is done with official registry keys, no hacks that might mess up future updates.
echo.
echo ONLY sources\$OEM$\$$\Panther\unattend.xml IS SUPPORTED!
echo autounattend.xml in root folder or similar breaks In-Place_Upgrade_Helper.bat!
echo.

set "sourcespath="
set /p sourcespath=Please enter the path to the WRITABLE installation medium (e.g. F:\ or D:\unpackedISO\):

if not exist "%sourcespath%"\setup.exe goto premainmenu
if not exist "%sourcespath%"\sources\ goto premainmenu

md "%temp%\mounttemp"
dism /mount-wim /wimfile:"%sourcespath%\sources\boot.wim" /index:1 /mountdir:"%temp%\mounttemp"
reg load HKLM\offline "%temp%\mounttemp\windows\system32\config\system"
reg add HKLM\offline\Setup\LabConfig /v BypassTPMCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassSecureBootCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassRAMCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassStorageCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassCPUCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassDiskCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\MoSetup /v AllowUpgradesWithUnsupportedTPMOrCPU /t reg_dword /d 0x00000001 /f
reg unload HKLM\offline
dism /unmount-image /mountdir:"%temp%\mounttemp" /commit
dism /mount-wim /wimfile:"%sourcespath%\sources\boot.wim" /index:2 /mountdir:"%temp%\mounttemp"
reg load HKLM\offline "%temp%\mounttemp\windows\system32\config\system"
reg add HKLM\offline\Setup\LabConfig /v BypassTPMCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassSecureBootCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassRAMCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassStorageCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassCPUCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\LabConfig /v BypassDiskCheck /t reg_dword /d 0x00000001 /f
reg add HKLM\offline\Setup\MoSetup /v AllowUpgradesWithUnsupportedTPMOrCPU /t reg_dword /d 0x00000001 /f
reg unload HKLM\offline
dism /unmount-image /mountdir:"%temp%\mounttemp" /commit
rd /S /Q "%temp%\mounttemp\"
md "%sourcespath%\sources\$OEM$\$$\Panther"
del /f "%sourcesspath%\unattend.xml"
del /f "%sourcespath%\autounattend.xml"
del /f "%sourcespath%\sources\unattend.xml"
del /f "%sourcespath%\sources\autounattend.xml"
del /f "%sourcespath%\sources\$OEM$\$$\Panther\unattend.xml"
del /f "%sourcespath%\sources\$OEM$\$$\Panther\autounattend.xml"
copy .\sources\$OEM$\$$\Panther\unattend.xml "%sourcespath%\sources\$OEM$\$$\Panther\"
del /f "%sourcespath%\sources\EI.CFG"
copy .\sources\EI.CFG "%sourcespath%\sources\"
echo.
echo.
echo.
echo Done.
echo Press any key to exit.
echo.
pause>nul|set/p=&echo(
exit
Loading

0 comments on commit fb87424

Please sign in to comment.