Skip to content

Commit beedf56

Browse files
committed
Skip TPM Check v7
remove wmi-based v1 if somehow it is still installed and cause issues delete archived versions since older bypasses are no longer advised
1 parent c3ff837 commit beedf56

7 files changed

+47
-174
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ Note that `MCT Defaults` preset creates a vanilla media without modifications! a
2323

2424
Get RP/BETA/DEV 11 builds via Windows Update on allegedly "unsupported" hardware
2525
--------------------------------------------------------------------------------
26-
Step 1: use [OfflineInsiderEnroll](https://github.com/abbodi1406/offlineinsiderenroll) to subscribe to the channel you want
27-
_while on 10, use BETA for Windows 11 22000.x builds (release), DEV for Windows 11 225xx.x builds (experimental)_
26+
Step 1: use [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/Skip_TPM_Check_on_Dynamic_Update.cmd) to automatically bypass setup requirements
27+
_It's a set it and forget it script, with built-in undo - v7 using more reliable /Product Server trick_
2828

29-
Step 2: use [Skip_TPM_Check_on_Dynamic_Update.cmd](bypass11/Skip_TPM_Check_on_Dynamic_Update.cmd) to automatically bypass setup requirements
30-
_It's a set it and forget it script, with built-in undo - v6 using more reliable /Product Server trick_
29+
Step 2: use [OfflineInsiderEnroll](https://github.com/abbodi1406/offlineinsiderenroll) to subscribe to the channel you want
30+
_while on 10, use BETA for Windows 11 22000.x builds (release), DEV for Windows 11 225xx.x builds (experimental)_
3131

3232
Step 3: check for updates via Settings - Windows Update and select Upgrade to Windows 11
3333

@@ -66,7 +66,7 @@ Presets
6666
>3 **Make USB** with detected media in specified usb target
6767
> _- can click Back and select ISO instead to save in a different path_
6868
69-
>4 **Select** with picked Edition, Language, Arch - on specified target
69+
>4 **Select** with user picked Edition, Language, Arch (x86,x64,both) - on specified target
7070
> _- implicit choice, will include setup override files_
7171
7272
>5 **MCT Defaults** with GUI selected media, makes vanilla, default MCT iso/usb
Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
11
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & exit/b
22
#:: double-click to run or just copy-paste into powershell - it's a standalone hybrid script
3-
#::
4-
#:: v6f dynamically skips the anti-consumer windows 11 setup checks via /Product Server trick
3+
4+
#:: v7 dynamically skips the anti-consumer windows 11 setup checks via /Product Server trick
55
#:: it is most reliable, and only has a 'Windows Server' label cosmetic-ish difference
66
#:: works with:
77
#:: 11 setup via Windows Update (after using OfflineInsiderEnroll by whatever127 and abbodi1406)
88
#:: 11 setup via mounted iso / usb (use the Quick.. script for skipping 11 setup checks at boot)
9-
#::
9+
1010
$_Paste_in_Powershell = { $Code = @'
11-
$Nfo = 'Skip TPM Check on Dynamic Update v6f, AveYo 2021'
12-
$Arg = (([environment]::get_CommandLine()-split'-[-]% ')[1]-split'.exe[\p{P}]? ')[1]
13-
foreach ($x in 'Product','DynamicUpdate','Telemetry') {$Arg = $Arg-replace$('\p{P}?/' + $x + '\p{P}? \p{P}?[A-Z]+\p{P}? '),' '}
14-
$Cli = ' /DynamicUpdate Disable /Telemetry Disable ' + $Arg; $Srv = ' /Product Server' + $Cli
15-
$Dir = join-path $([Environment]::SystemDirectory[0..2]-join'') '$WINDOWS.~BT\Sources\'
16-
$Cfg = join-path $Dir 'EI.cfg'; $EI = '[Channel]' +[char]13+[char]10+ '_Default' +[char]13+[char]10
17-
$Exe = join-path $Dir 'SetupHost.exe'; $Inf = get-item -force -lit $Exe; [int]$Ver = $Inf.VersionInfo.FileBuildPart
18-
if ($Ver -ge 22000) {$Run = $Exe + $Srv} else {$Run = $Exe + $Cli}
19-
if ($Ver -ge 22000 -and !(test-path $Cfg)) {[io.file]::WriteAllText($Cfg, $EI)}
20-
$D=@(); $T=@(); $A=@(); $M=[AppDomain]::CurrentDomain.DefineDynamicAssembly(1,1).DefineDynamicModule(1)
21-
foreach ($x in 0..2) {$D+=$M.DefineType('AveYo_'+$x,1179913,[ValueType])}; foreach ($x in 1..2) {$D+=$D[$x].MakeByRefType()}
22-
$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)}
23-
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)}
24-
$9=$D[0].DefinePInvokeMethod('CreateProcess','kernel32',8214,1,[void],($S,$S,$I,$I,[bool],$I,$I,$S,$D[3],$D[4]),1,4)
25-
$9=$D[0].DefinePInvokeMethod('DebugActiveProcessStop','kernel32',8214,1,[void],($I),1,4)
26-
foreach ($x in 0..2) {$T+=$D[$x].CreateType()}; foreach ($x in 1..2) {$A+=[Activator]::CreateInstance($T[$x])}
27-
$R=$null, $Run, $null, $null, $false, 0x02000011, $null, $null, $A[0], $A[1]
28-
$T[0].GetMethod('CreateProcess').invoke(0, $R); $T[0].GetMethod('DebugActiveProcessStop').invoke(0, $R[9].f2)
29-
$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} }
30-
'@ -replace '\r?\n|\r', '; ' <# lines 19-28 are needed for escaping ifeo, remain calm ;) #>
31-
$IFEO = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SetupHost.exe'
32-
$Prog = join-path $([Environment]::SystemDirectory[0..2] -join '') '$WINDOWS.~BT\Sources\SetupHost.exe'
33-
$Skip = "powershell -win 1 -nop -c iex (get-itemproperty '$IFEO\0' 'Code' -ea 0).Code; write-host --%"
34-
remove-item $($IFEO -replace 'SetupHost', 'vdsldr') -rec -force -ea 0 >''; rmdir (split-path $Prog) -rec -force -ea 0 >''
35-
if (test-path "$IFEO\0") {
36-
remove-item $IFEO -rec -force -ea 0 >''
37-
write-host -fore 0xf -back 0xd "`n Skip TPM Check on Dynamic Update v6f [REMOVED] run again to install "
38-
} else {
39-
new-item "$IFEO\0" -force -ea 0 >''
40-
set-itemproperty "$IFEO\0" 'Debugger' $Skip -force -ea 0; set-itemproperty "$IFEO\0" 'Code' $Code -force -ea 0
41-
set-itemproperty "$IFEO\0" 'FilterFullPath' $Prog -force -ea 0; set-itemproperty $IFEO 'UseFilter' 1 -type dword -force -ea 0
42-
write-host -fore 0xf -back 0x2 "`n Skip TPM Check on Dynamic Update v6f [INSTALLED] run again to remove " } ; timeout /t 5
11+
$Nfo = 'Skip TPM Check on Dynamic Update v7, AveYo 2021'
12+
$Arg = (([environment]::get_CommandLine()-split'-[-]% ')[1]-split'.exe[\p{P}]? ')[1]
13+
foreach ($x in 'Product','DynamicUpdate','Telemetry') {$Arg = $Arg -replace $('\p{P}?/'+ $x +'\p{P}? \p{P}?[A-Z]+\p{P}? '),' '}
14+
$Cli = ' /DynamicUpdate Disable /Telemetry Disable ' + $Arg; $Srv = ' /Product Server' + $Cli
15+
$Dir = join-path $([Environment]::SystemDirectory[0..2]-join'') '$WINDOWS.~BT\Sources\'
16+
$Cfg = join-path $Dir 'EI.cfg'; $EI = '[Channel]' +[char]13+[char]10+ '_Default' +[char]13+[char]10
17+
$Exe = join-path $Dir 'SetupHost.exe'; $Inf = get-item -force -lit $Exe; [int]$Ver = $Inf.VersionInfo.FileBuildPart
18+
if ($Ver -ge 22000) {$Run = $Exe + $Srv} else {$Run = $Exe + $Cli}
19+
if ($Ver -ge 22000 -and !(test-path $Cfg)) {[io.file]::WriteAllText($Cfg, $EI)}
20+
21+
$D=@(); $T=@(); $A=@(); $M=[AppDomain]::CurrentDomain.DefineDynamicAssembly(1,1).DefineDynamicModule(1)
22+
foreach ($x in 0..2) {$D+=$M.DefineType('AveYo_'+$x,1179913,[ValueType])}; foreach ($x in 1..2) {$D+=$D[$x].MakeByRefType()}
23+
$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)}
24+
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)}
25+
$9=$D[0].DefinePInvokeMethod('CreateProcess','kernel32',8214,1,[void],($S,$S,$I,$I,[bool],$I,$I,$S,$D[3],$D[4]),1,4)
26+
$9=$D[0].DefinePInvokeMethod('DebugActiveProcessStop','kernel32',8214,1,[void],($I),1,4)
27+
foreach ($x in 0..2) {$T+=$D[$x].CreateType()}; foreach ($x in 1..2) {$A+=[Activator]::CreateInstance($T[$x])}
28+
$R=$null, $Run, $null, $null, $false, 0x02000011, $null, $null, $A[0], $A[1]
29+
$T[0].GetMethod('CreateProcess').invoke(0, $R); $T[0].GetMethod('DebugActiveProcessStop').invoke(0, $R[9].f2)
30+
$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} }
31+
'@ -replace '\r?\n|\r', '; ' <# lines 20-29 are needed for escaping ifeo, remain calm ;) #>
32+
33+
$IFEO = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\SetupHost.exe'
34+
$Prog = join-path $([Environment]::SystemDirectory[0..2] -join '') '$WINDOWS.~BT\Sources\SetupHost.exe'
35+
$Skip = "powershell -win 1 -nop -c iex (get-itemproperty '$IFEO\0' 'Code' -ea 0).Code; write-host --%"
36+
if (test-path "$IFEO\0") {
37+
remove-item $IFEO -rec -force -ea 0 >''
38+
write-host -fore 0xf -back 0xd "`n Skip TPM Check on Dynamic Update v7 [REMOVED] run again to install "
39+
} else {
40+
new-item "$IFEO\0" -force -ea 0 >''
41+
set-itemproperty "$IFEO\0" 'Debugger' $Skip -force -ea 0; set-itemproperty "$IFEO\0" 'Code' $Code -force -ea 0
42+
set-itemproperty "$IFEO\0" 'FilterFullPath' $Prog -force -ea 0; set-itemproperty $IFEO 'UseFilter' 1 -type dword -force -ea 0
43+
write-host -fore 0xf -back 0x2 "`n Skip TPM Check on Dynamic Update v7 [INSTALLED] run again to remove "
44+
}
45+
remove-item $($IFEO -replace 'SetupHost', 'vdsldr') -rec -force -ea 0 >''; rmdir (split-path $Prog) -rec -force -ea 0 >''
46+
$N = 'Skip TPM Check on Dynamic Update' <# also remove wmi-based v1 if somehow still installed, not just vdsldr-based v2 - v5 #>
47+
$U = 'root\subscription'; $C = gwmi -Class CommandLineEventConsumer -Namespace $U -Filter "Name='$N'" -ea 0
48+
$B = gwmi -Class __FilterToConsumerBinding -Namespace $U -Filter "Filter = ""__eventfilter.name='$N'""" -ea 0
49+
$F = gwmi -Class __EventFilter -NameSpace $U -Filter "Name='$N'" -ea 0; $B,$C,$F |% {$_|rwmi -ea 0}; timeout /t 5
4350
} ; start -verb runas powershell -args "-nop -c & {`n`n$($_Paste_in_Powershell-replace'"','\"')}"
4451
$_Press_Enter
4552
#::

bypass11/archived/Skip_TPM_Check_on_Dynamic_Update_v1.cmd

Lines changed: 0 additions & 29 deletions
This file was deleted.

bypass11/archived/Skip_TPM_Check_on_Dynamic_Update_v2.cmd

Lines changed: 0 additions & 25 deletions
This file was deleted.

bypass11/archived/Skip_TPM_Check_on_Dynamic_Update_v3.cmd

Lines changed: 0 additions & 28 deletions
This file was deleted.

bypass11/archived/Skip_TPM_Check_on_Dynamic_Update_v4.cmd

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)