Skip TPM Check v6

For a more reliable and future-proof experience,
clean installation is still handled via winsetup.dll patching in boot.wim
upgrade is now handled only via auto.cmd with the /Product Server trick
Just ignore the Installing Windows Server label, please!

update Skip_TPM_Check_on_Dynamic_Update.cmd v6

update readme
This commit is contained in:
AveYo 2021-12-07 12:16:21 +02:00
parent b23d5f4a0f
commit a445dddd06
4 changed files with 103 additions and 48 deletions

View File

@ -2,9 +2,9 @@
:Universal MCT wrapper script for all Windows 10/11 versions from 1507 to 21H2! :Universal MCT wrapper script for all Windows 10/11 versions from 1507 to 21H2!
:: Nothing but Microsoft-hosted source links and no third-party tools; script just configures an xml and starts MCT :: Nothing but Microsoft-hosted source links and no third-party tools; script just configures an xml and starts MCT
:: Ingenious support for business editions (Enterprise / VL) selecting language, x86, x64 or AiO inside the MCT GUI :: Ingenious support for business editions (Enterprise / VL) selecting language, x86, x64 or AiO inside the MCT GUI
:: Changelog: 2021.11.16 :: Changelog: 2021.12.07
:: - skip windows 11 upgrade checks only via auto.cmd - just ignore server label, please; local account on 11 Home
:: - write output to script folder (or C:\ESD if run from zip); do not use esd links larger than 4GB (MCT limits) :: - write output to script folder (or C:\ESD if run from zip); do not use esd links larger than 4GB (MCT limits)
:: - skip windows 11 upgrade checks with setup.exe (not just auto.cmd); no server label; local account on 11 Home
:: 11: 22000.318 / 21H2: 19044.1288 / 21H1: 19043.1348 / 20H2: 19042.1052 / 2004: 19041.572 / 1909: 18363.1139 :: 11: 22000.318 / 21H2: 19044.1288 / 21H1: 19043.1348 / 20H2: 19042.1052 / 2004: 19041.572 / 1909: 18363.1139
::# uncomment to skip GUI dialog for MCT choice: 1507 to 2109 / 11 - or rename script: "21H2 MediaCreationTool.bat" ::# uncomment to skip GUI dialog for MCT choice: 1507 to 2109 / 11 - or rename script: "21H2 MediaCreationTool.bat"
@ -295,7 +295,7 @@ fltmc>nul || (set _=start "MCT" cmd /d/x/r call "%~f0" %* %set%& powershell -nop
mkdir "%ROOT%\MCT" >nul 2>nul & attrib -R -S -H %ROOT% /D & pushd "%ROOT%\MCT" mkdir "%ROOT%\MCT" >nul 2>nul & attrib -R -S -H %ROOT% /D & pushd "%ROOT%\MCT"
del /f /q products.* *.key EI.cfg PID.txt auto.cmd AutoUnattend.xml >nul 2>nul del /f /q products.* *.key EI.cfg PID.txt auto.cmd AutoUnattend.xml >nul 2>nul
set /a latest=0 & if exist latest set /p latest=<latest set /a latest=0 & if exist latest set /p latest=<latest
echo,20211116>latest & if %latest% lss 20211116 del /f /q products*.* MediaCreationTool*.exe >nul 2>nul echo,20211207>latest & if %latest% lss 20211116 del /f /q products*.* MediaCreationTool*.exe >nul 2>nul
::# edition fallback to ones that MCT supports - after selection ::# edition fallback to ones that MCT supports - after selection
(set MEDIA_EDITION=%MEDIA_EDITION:Embedded=Enterprise%) (set MEDIA_EDITION=%MEDIA_EDITION:Embedded=Enterprise%)
@ -390,7 +390,7 @@ if not defined PKEY if "Enterprise" equ "%EDITION%" set "KEY=" &rem explicitly r
if not defined KEY (del /f /q PID.txt 2>nul) else (echo;[PID]& echo;Value=%KEY%& echo;;Edition=%EDITION%)>PID.txt if not defined KEY (del /f /q PID.txt 2>nul) else (echo;[PID]& echo;Value=%KEY%& echo;;Edition=%EDITION%)>PID.txt
::# generate EI.cfg for skipping key entry for generic 11 media ::# generate EI.cfg for skipping key entry for generic 11 media
if not defined KEY if %CFG% equ Consumer if %VER% geq 22000 (echo;[Channel]& echo;_Default)>EI.cfg if not defined KEY if %VER% geq 22000 (echo;[Channel]& echo;_Default)>EI.cfg
::# generate auto.cmd for upgrading without prompts - also copied to media so it can be re-run on demand ::# generate auto.cmd for upgrading without prompts - also copied to media so it can be re-run on demand
set "0=%~f0"& powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]generate_auto_cmd')[1];" set "0=%~f0"& powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]generate_auto_cmd')[1];"
@ -400,7 +400,7 @@ set "0=%~f0"& powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]g
set "0=%~f0"& powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]generate_AutoUnattend_xml')[1];" set "0=%~f0"& powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]generate_AutoUnattend_xml')[1];"
::# start script-assisted MCT via powershell (to monitor setup state and take necessary action) ::# start script-assisted MCT via powershell (to monitor setup state and take necessary action)
set "0=%~f0"& start "MCT" /wait /b powershell -nop -c "iex ([io.file]::ReadAllText($env:0)-split'[:]Assisted_MCT')[1];" set "0=%~f0"& start "MCT" /wait /b powershell -nop -noe -c "iex ([io.file]::ReadAllText($env:0)-split'[:]Assisted_MCT')[1];"
::-------------------------------------------------------------------------------------------------------------------------------- ::--------------------------------------------------------------------------------------------------------------------------------
EXIT /BATCH DONE EXIT /BATCH DONE
@ -486,7 +486,7 @@ EXIT /BATCH DONE
if ('Auto Upgrade' -ne $env:PRESET -and $null -eq $USB) {write-host -fore Gray "Prepare", $ISO} if ('Auto Upgrade' -ne $env:PRESET -and $null -eq $USB) {write-host -fore Gray "Prepare", $ISO}
if ('Auto Upgrade' -ne $env:PRESET -and $null -ne $USB) {write-host -fore Gray "Prepare", $USB} if ('Auto Upgrade' -ne $env:PRESET -and $null -ne $USB) {write-host -fore Gray "Prepare", $USB}
if ('Auto Upgrade' -eq $env:PRESET) {write-host -fore Gray "Prepare", $DIR} if ('Auto Upgrade' -eq $env:PRESET) {write-host -fore Gray "Prepare", $DIR}
$label = "${env:X}_${env:VIS}_" + ($ESD -split '_client')[1] $label = "${env:X}_${env:VIS}" + ($ESD -split '(?=_vol_|_ret_)')[1]
write-host -fore Gray "FromESD", $label; sleep 10; powershell -win $env:hide -nop -c ";" write-host -fore Gray "FromESD", $label; sleep 10; powershell -win $env:hide -nop -c ";"
#:: watch setup files progress from the sideline (MCT has authoring control) #:: watch setup files progress from the sideline (MCT has authoring control)
@ -497,15 +497,11 @@ EXIT /BATCH DONE
#:: add to media $OEM$, EI.cfg, PID.txt, auto.cmd (includes 11 Setup override) - disable via DEF arg #:: add to media $OEM$, EI.cfg, PID.txt, auto.cmd (includes 11 Setup override) - disable via DEF arg
pushd -lit "$env:ROOT"; foreach ($P in "$DIR\x86\sources","$DIR\x64\sources","$DIR\sources") { pushd -lit "$env:ROOT"; foreach ($P in "$DIR\x86\sources","$DIR\x64\sources","$DIR\sources") {
if (($null -ne $env:DEF) -or !(test-path "$P\setupprep.exe")) {continue} if (($null -ne $env:DEF) -or !(test-path "$P\setupprep.exe")) {continue}
if ($ESD -like '*_vol_*') {del "MCT\EI.cfg" -force -ea 0 >''}
$f1 = '$OEM$'; if (test-path -lit $f1) {xcopy /CYBERHIQ $f1 "$P\$f1" >''; write-host -fore Gray AddFile $f1} $f1 = '$OEM$'; if (test-path -lit $f1) {xcopy /CYBERHIQ $f1 "$P\$f1" >''; write-host -fore Gray AddFile $f1}
$f2 = "MCT\EI.cfg"; if (test-path $f2) {copy -path $f2 -dest $P -force >''; write-host -fore Gray AddFile $f2} $f2 = "MCT\EI.cfg"; if (test-path $f2) {copy -path $f2 -dest $P -force >''; write-host -fore Gray AddFile $f2}
$f3 = "MCT\PID.txt"; if (test-path $f3) {copy -path $f3 -dest $P -force >''; write-host -fore Gray AddFile $f3} $f3 = "MCT\PID.txt"; if (test-path $f3) {copy -path $f3 -dest $P -force >''; write-host -fore Gray AddFile $f3}
$f4 = "MCT\auto.cmd"; if (test-path $f4) {copy -path $f4 -dest $DIR -force >''; write-host -fore Gray AddFile $f4} $f4 = "MCT\auto.cmd"; if (test-path $f4) {copy -path $f4 -dest $DIR -force >''; write-host -fore Gray AddFile $f4}
#:: skip windows 11 upgrade checks - for running setup.exe with or without Dynamic Update on cock-blocked configurations
if ($env:VER -ge 22000) {
new-item -itemtype "file" -path "$P\Panther\Appraiser_Data.ini" -name "Pass" -value "AveYo" -force -ea 0 >''
write-host -fore Gray AddFile Windows 11 Upgrade Pass
}
} ; popd } ; popd
#:: done if not 11 or auto upgrade preset #:: done if not 11 or auto upgrade preset
@ -560,7 +556,7 @@ EXIT /BATCH DONE
write-host "`r`n UPGRADING ... `r`n"; sleep 7; return write-host "`r`n UPGRADING ... `r`n"; sleep 7; return
} }
#:: skip windows 11 upgrade checks - for running setup from boot media on cock-blocked configurations #:: skip windows 11 upgrade checks - for running setup from boot media
if ($env:VER -ge 22000 -and (test-path "$DIR\sources\boot.wim")) { if ($env:VER -ge 22000 -and (test-path "$DIR\sources\boot.wim")) {
write-host -fore Yellow "Disable boot.wim 11 setup checks" write-host -fore Yellow "Disable boot.wim 11 setup checks"
rmdir "$WD\MOUNT" -re -force -ea 0; mkdir "$WD\MOUNT" -force -ea 0 >''; $winsetup = "$WD\MOUNT\sources\winsetup.dll" rmdir "$WD\MOUNT" -re -force -ea 0; mkdir "$WD\MOUNT" -force -ea 0 >''; $winsetup = "$WD\MOUNT\sources\winsetup.dll"
@ -590,7 +586,7 @@ EXIT /BATCH DONE
start -nonew cmd "/d/x/c rmdir /s /q ""$DIR"" & del /f /q ""$WS\*.*""" >'' start -nonew cmd "/d/x/c rmdir /s /q ""$DIR"" & del /f /q ""$WS\*.*""" >''
} }
write-host "`r`n DONE `r`n"; sleep 7; return write-host "`r`nDONE`r`n"; sleep 7; return
#:: done #:Assisted_MCT #:: done #:Assisted_MCT
::-------------------------------------------------------------------------------------------------------------------------------- ::--------------------------------------------------------------------------------------------------------------------------------
@ -675,9 +671,12 @@ if defined change for %%i in (!e%change%!) do (set change=%%i)& rem if defined p
echo;Edition change: %change% echo;Edition change: %change%
echo;Selected index: %index% echo;Selected index: %index%
::# prevent usage of MCT for intermediary upgrade in Dynamic Update (causing 7 to 19H1 instead of 7 to 11 for example) ::# prevent usage of MCT for intermediary upgrade in Dynamic Update (causing 7 to 19H1 instead of 7 to 21H2 for example)
if "%Build1%" gtr "15063" (set OPTIONS=%OPTIONS% /UpdateMedia Decline) if "%Build1%" gtr "15063" (set OPTIONS=%OPTIONS% /UpdateMedia Decline)
::# skip windows 11 upgrade checks via launch option trick - this way, can still run setup.exe directly to not skip checks
if "%Build1%" geq "22000" (set OPTIONS=/Product Server %OPTIONS%)
::# auto upgrade with edition lie workaround to keep files and apps - all 1904x builds allow up/downgrade between them ::# auto upgrade with edition lie workaround to keep files and apps - all 1904x builds allow up/downgrade between them
if defined change call :rename %change% if defined change call :rename %change%

View File

@ -9,28 +9,34 @@ Windows 10
Windows 11 Windows 11
---------- ----------
[MediaCreationTool.bat](MediaCreationTool.bat) creates 11 media that will **automatically skip upgrade or clean install checks** [MediaCreationTool.bat](MediaCreationTool.bat) creates 11 media that will **automatically skip clean install checks**
with 11 Setup label (not changed to Server) and with local account support on 11 Home editions setup.exe will not automatically skip upgrade checks - launch the included `auto.cmd` instead!
>Sharpest 11 bypass atm is using `/Product Server` option or `<INSTALLATIONTYPE>Server` on the install image,
tho I understand that many of you dislike the _Installing Windows Server_ cosmetic artifact _(not purely cosmetic)_,
so the methods used are my older _Appraiser_Data.ini_ trick to upgrade plus _winsetup.dll_ patching in _boot.wim_.
note that `MCT Defaults` preset creates a vanilla media without modifications! all others skip install checks For a more reliable and future-proof experience,
clean installation is still handled via _winsetup.dll_ patching in _boot.wim_
upgrade is now handled only via `auto.cmd` with the */Product Server* trick
Just ignore the *Windows Server* label, please!
Note that [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/Skip_TPM_Check_on_Dynamic_Update.cmd) **will skip upgrade checks via setup.exe as well**
Note that `MCT Defaults` preset creates a vanilla media without modifications! all others skip install checks
Get RP/BETA/DEV 11 builds via Windows Update on allegedly "unsupported" hardware Get RP/BETA/DEV 11 builds via Windows Update on allegedly "unsupported" hardware
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Step 1: use [OfflineInsiderEnroll](https://github.com/abbodi1406/offlineinsiderenroll) to subscribe to the channel you want Step 1: use [OfflineInsiderEnroll](https://github.com/abbodi1406/offlineinsiderenroll) to subscribe to the channel you want
_while on 10, use BETA for Windows 11 22000.x builds (release), DEV for Windows 11 225xx.x builds (experimental)_ _while on 10, use BETA for Windows 11 22000.x builds (release), DEV for Windows 11 225xx.x builds (experimental)_
Step 2: use [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/) to automatically bypass setup requirements Step 2: use [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/Skip_TPM_Check_on_Dynamic_Update.cmd) to automatically bypass setup requirements
_It's a set it and forget it script, with built-in undo_ _It's a set it and forget it script, with built-in undo - v6 using more reliable /Product Server trick_
Step 3: check for updates via Settings - Windows Update and select Upgrade to Windows 11 Step 3: check for updates via Settings - Windows Update and select Upgrade to Windows 11
Note that [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/Skip_TPM_Check_on_Dynamic_Update.cmd) **will work for manual upgrade as well**
_regardless of mounted iso / usb media already having a bypass added or not_
If you already have an 11 ISO, USB or extracted Files and want to add a bypass If you already have an 11 ISO, USB or extracted Files and want to add a bypass
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
[Quick_11_iso_esd_wim_TPM_toggle.bat](bypass11/Quick_11_iso_esd_wim_TPM_toggle.bat) from the confort of right-click - SendTo menu Use [Quick_11_iso_esd_wim_TPM_toggle.bat](bypass11/Quick_11_iso_esd_wim_TPM_toggle.bat) from the confort of right-click - SendTo menu
switches installation type to Server skipping install checks, or back to Client if run again on the same file, restoring hash! switches installation type to Server skipping install checks, or back to Client if run again on the same file, restoring hash!
@ -38,11 +44,15 @@ switches installation type to Server skipping install checks, or back to Client
_defiantly quick_ _defiantly quick_
works great with business / enterprise media since it comes with ei.cfg so setup won't ask for a setup key at start works great with business / enterprise media since it comes with ei.cfg so setup won't ask for product key at start
tho you can add a generic `ei.cfg` to the media\sources yourself with this content: for consumer / core media you can add a generic `ei.cfg` to the media\sources yourself with this content:
`[Channel]` `[Channel]`
`_Default` `_Default`
if setup still asks for product key, input gvlk keys found in media\sources\product.ini
_gvlkprofessional=W269N-WFGWX-YVC9B-4J6C9-T83GX gvlkcore=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99_
_gvlkenterprise=NPPR9-FWDCX-D2C8J-H872K-2YT43 gvlkeducation=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 etc._
Presets Presets
------- -------
@ -68,7 +78,7 @@ Presets
> _- write `sources\PID.txt` to preselect edition at media boot or setup within windows (if configured)_ > _- write `sources\PID.txt` to preselect edition at media boot or setup within windows (if configured)_
> _- write `auto.cmd` to re-run upgrade with cross-edition support from media on demand_ > _- write `auto.cmd` to re-run upgrade with cross-edition support from media on demand_
> _- write `AutoUnattend.xml` in boot.wim to enable local account on Windows 11 Home_ > _- write `AutoUnattend.xml` in boot.wim to enable local account on Windows 11 Home_
> _- patch `winsetup.dll` in boot.wim to remove windows 11 setup cock-blocks when booting from media_ > _- patch `winsetup.dll` in boot.wim to remove windows 11 setup checks when booting from media_
> configure via set vars, commandline parameters or rename script like `iso 21H2 Pro MediaCreationTool.bat` > configure via set vars, commandline parameters or rename script like `iso 21H2 Pro MediaCreationTool.bat`
> recommended windows setup options with the least amount of issues on upgrades set via auto.cmd > recommended windows setup options with the least amount of issues on upgrades set via auto.cmd
@ -125,4 +135,5 @@ _We did it! We broke [the previous gist](https://git.io/MediaCreationTool.bat)_
20H2 builds with esd size above 4GB that had to be reverted at 19042.631: en,de,es,pt,fr,it,jp,zh (MCT limits) 20H2 builds with esd size above 4GB that had to be reverted at 19042.631: en,de,es,pt,fr,it,jp,zh (MCT limits)
2021.11.16: 10 19044.1288 - official release of 10 21H2 2021.11.16: 10 19044.1288 - official release of 10 21H2
10 19043.1348 - newest 10 build - don't ask why ms is releasing these as such, it's not the first time 10 19043.1348 - newest 10 build - don't ask why ms is releasing these as such, it's not the first time
2021.12.07: skip windows 11 upgrade checks only via auto.cmd - just ignore server label, please
``` ```

View File

@ -1,26 +1,45 @@
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit/b @(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit/b
#:: double-click to run or just copy-paste into powershell - it's a standalone hybrid script #:: double-click to run or just copy-paste into powershell - it's a standalone hybrid script
#:: v5 of the toggle script uses programdata instead of system32, no longer deletes appraiserres.dll, and clears bypass folder #::
#:: uses IFEO to attach to Virtual Disk Service Loader process running during setup, then creates a bypass dir #:: v6 dynamically skips the anti-consumer windows 11 setup checks via /Product Server trick
#:: it must also do some ping-pong renaming of vdsldr in programdata #:: it is most reliable, and only has a 'Windows Server' label cosmetic-ish difference
#:: you probably don't need to have it installed at all times - just when doing feature updates or manual setup within windows #:: works with:
#:: hence the on off toggle just by running the script again #:: 11 setup via Windows Update (after using OfflineInsiderEnroll by whatever127 and abbodi1406)
#:: can get 11 release beta or dev builds via Windows Update after using OfflineInsiderEnroll by whatever127 and abbodi1406 #:: 11 setup via mounted iso / usb (use the Quick.. script for skipping 11 setup checks at boot)
#::
$_Paste_in_Powershell = { $_Paste_in_Powershell = { $Code = @'
$N = "Skip TPM Check on Dynamic Update"; $X = @("' $N (c) AveYo 2021 : v4 IFEO-based with no flashing cmd window") $Nfo = 'Skip TPM Check on Dynamic Update v6, AveYo 2021'
$X+= 'C = "cmd /q AveYo /d/x/r pushd %systemdrive%\\$windows.~bt\\Sources\\Panther && mkdir Appraiser_Data.ini\\AveYo&"' $Arg = (([environment]::get_CommandLine()-split'-[-]% ')[1]-split'.exe[\p{P}]? ')[1]
$X+= 'M = "pushd %allusersprofile%& ren vd.exe vdsldr.exe &robocopy ""%systemroot%/system32/"" ""./"" ""vdsldr.exe""&"' foreach ($x in 'Product','DynamicUpdate','Telemetry') {$Arg = $Arg -replace $(' .?/' + $x + '.? .?[A-Z]+.? '),' '}
$X+= 'D = "ren vdsldr.exe vd.exe& start vd.exe -Embedding" : CreateObject("WScript.Shell").Run C & M & D, 0, False' $Cli = ' /DynamicUpdate Disable /Telemetry Disable ' + $Arg; $Srv = ' /Product Server' + $Cli
$K = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\vdsldr.exe' $Dir = join-path $([Environment]::SystemDirectory[0..2]-join'') '$WINDOWS.~BT\Sources\'
$P = [Environment]::GetFolderPath('CommonApplicationData'); $F = join-path $P '11tpm.vbs'; $V = "wscript $F //B //T:5" $Cfg = join-path $Dir 'EI.cfg'; $EI = '[Channel]' +[char]13+[char]10+ '_Default' +[char]13+[char]10
if (test-path $K) { $Exe = join-path $Dir 'SetupHost.exe'; $Inf = get-item -force -lit $Exe; [int]$Ver = $Inf.VersionInfo.FileBuildPart
remove-item $K -force -ea 0 >''; del $F -force -ea 0; del (join-path $P 'vd.exe') -force -ea 0 if ($Ver -ge 22000) {$Run = $Exe + $Srv} else {$Run = $Exe + $Cli}
write-host -fore 0xf -back 0xd "`n $N v4 [REMOVED] run again to install " if ($Ver -ge 22000 -and !(test-path $Cfg)) {[io.file]::WriteAllText($Cfg, $EI)}
} else { $D=@(); $T=@(); $A=@(); $M=[AppDomain]::CurrentDomain.DefineDynamicAssembly(1,1).DefineDynamicModule(1)
new-item $K -force -ea 0 >''; set-itemproperty $K 'Debugger' $V -force -ea 0; [io.file]::WriteAllText($F, $X-join"`r`n") foreach ($x in 0..2) {$D+=$M.DefineType('AveYo_'+$x,1179913,[ValueType])}; foreach ($x in 1..2) {$D+=$D[$x].MakeByRefType()}
write-host -fore 0xf -back 0x2 "`n $N v4 [INSTALLED] run again to remove " $S=[string]; $I=[int32]; $U=[uintptr]; $y=0; $z=0; foreach ($x in $U,$U,$I,$I) {$9=$D[2].DefineField('f'+$y++,$x,6)}
} ; rmdir $([Environment]::SystemDirectory[0]+':\\$Windows.~BT\\Sources\\Panther') -rec -force -ea 0; timeout /t 5 foreach ($x in $I,$S,$S,$S,$I,$I,$I,$I,$I,$I,$I,$I,[int16],[int16],$U,$U,$U,$U) {$9=$D[1].DefineField('f'+$z++,$x,6)}
} ; start powershell -args "-nop -c & {`n`n$($_Paste_in_Powershell-replace'"','\"')}" -verb runas $9=$D[0].DefinePInvokeMethod('CreateProcess','kernel32',8214,1,[void],($S,$S,$I,$I,[bool],$I,$I,$S,$D[3],$D[4]),1,4)
$9=$D[0].DefinePInvokeMethod('DebugActiveProcessStop','kernel32',8214,1,[void],($I),1,4)
foreach ($x in 0..2) {$T+=$D[$x].CreateType()}; foreach ($x in 1..2) {$A+=[Activator]::CreateInstance($T[$x])}
$R=$null, $Run, $null, $null, $false, 0x02000011, $null, $null, $A[0], $A[1]
$T[0].GetMethod('CreateProcess').invoke(0, $R); $T[0].GetMethod('DebugActiveProcessStop').invoke(0, $R[9].f2)
$W=get-process -pid $R[9].f2 -ea 0; for (;;) {sleep 1; if (0-eq $R[9].f2 -or $null-eq $W -or $W.HasExited) {return} }
'@ -replace '\r?\n|\r', '; ' <# lines 19-28 are needed for escaping ifeo, remain calm ;) #>
$IFEO = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SetupHost.exe'
$Prog = join-path $([Environment]::SystemDirectory[0..2] -join '') '$WINDOWS.~BT\Sources\SetupHost.exe'
$Skip = "powershell -win 1 -nop -c iex (get-itemproperty '$IFEO\0' 'Code' -ea 0).Code; write-host --%"
remove-item $($IFEO -replace 'SetupHost', 'vdsldr') -rec -force -ea 0 >''; rmdir (split-path $Prog) -rec -force -ea 0 >''
if (test-path "$IFEO\0") {
remove-item $IFEO -rec -force -ea 0 >''
write-host -fore 0xf -back 0xd "`n Skip TPM Check on Dynamic Update v6 [REMOVED] run again to install "
} else {
new-item "$IFEO\0" -force -ea 0 >''
set-itemproperty "$IFEO\0" 'Debugger' $Skip -force -ea 0; set-itemproperty "$IFEO\0" 'Code' $Code -force -ea 0
set-itemproperty "$IFEO\0" 'FilterFullPath' $Prog -force -ea 0; set-itemproperty $IFEO 'UseFilter' 1 -type dword -force -ea 0
write-host -fore 0xf -back 0x2 "`n Skip TPM Check on Dynamic Update v6 [INSTALLED] run again to remove " } ; timeout /t 5
} ; start -verb runas powershell -args "-nop -c & {`n`n$($_Paste_in_Powershell-replace'"','\"')}"
$_Press_Enter $_Press_Enter
#:: #::

View File

@ -0,0 +1,26 @@
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit/b
#:: double-click to run or just copy-paste into powershell - it's a standalone hybrid script
#:: v5 of the toggle script uses programdata instead of system32, no longer deletes appraiserres.dll, and clears bypass folder
#:: uses IFEO to attach to Virtual Disk Service Loader process running during setup, then creates a bypass dir
#:: it must also do some ping-pong renaming of vdsldr in programdata
#:: you probably don't need to have it installed at all times - just when doing feature updates or manual setup within windows
#:: hence the on off toggle just by running the script again
#:: can get 11 release beta or dev builds via Windows Update after using OfflineInsiderEnroll by whatever127 and abbodi1406
$_Paste_in_Powershell = {
$N = "Skip TPM Check on Dynamic Update"; $X = @("' $N (c) AveYo 2021 : v4 IFEO-based with no flashing cmd window")
$X+= 'C = "cmd /q AveYo /d/x/r pushd %systemdrive%\\$windows.~bt\\Sources\\Panther && mkdir Appraiser_Data.ini\\AveYo&"'
$X+= 'M = "pushd %allusersprofile%& ren vd.exe vdsldr.exe &robocopy ""%systemroot%/system32/"" ""./"" ""vdsldr.exe""&"'
$X+= 'D = "ren vdsldr.exe vd.exe& start vd.exe -Embedding" : CreateObject("WScript.Shell").Run C & M & D, 0, False'
$K = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\vdsldr.exe'
$P = [Environment]::GetFolderPath('CommonApplicationData'); $F = join-path $P '11tpm.vbs'; $V = "wscript $F //B //T:5"
if (test-path $K) {
remove-item $K -force -ea 0 >''; del $F -force -ea 0; del (join-path $P 'vd.exe') -force -ea 0
write-host -fore 0xf -back 0xd "`n $N v5 [REMOVED] run again to install "
} else {
new-item $K -force -ea 0 >''; set-itemproperty $K 'Debugger' $V -force -ea 0; [io.file]::WriteAllText($F, $X-join"`r`n")
write-host -fore 0xf -back 0x2 "`n $N v5 [INSTALLED] run again to remove "
} ; rmdir $([Environment]::SystemDirectory[0]+':\\$Windows.~BT\\Sources\\Panther') -rec -force -ea 0; timeout /t 5
} ; start powershell -args "-nop -c & {`n`n$($_Paste_in_Powershell-replace'"','\"')}" -verb runas
$_Press_Enter
#::