首页 > 技术文章 > 解决Windwos 11 TPM 2.0 限制无法安装的方法

jddreams 2021-10-25 13:29 原文

原文摘录于:异次元软件世界 https://www.iplaysoft.com/windows11.html 详细内容请访问原文。

方法 1、通过 WinPE 加载镜像安装

如果你遇到由于 TPM 2.0 限制无法安装的情况,最简单的解决方式是「使用 WinPE 系统」加载 ISO 镜像,在 UEFI+GPT 硬盘的环境下安装,几乎就不会再遇到什么问题了。

方法 2、替换或删除 DLL 文件

你可以在 Windows 10 (21H1正式版) 的 ISO 镜像中找到 appraiserres.dll(该文件位于 sources 文件夹里),用它替换掉 Win11 镜像中的同名文件即可。也有网友表示,直接在 Win11 的镜像中删除该文件也可以。

方法 3、修改注册表

如果你使用 U 盘来安装 Windows 11,提示“该电脑无法运行”的错误,那么可以按下 Shift + F10 键打开命令行界面并输入 regedit 回车打开注册表编辑器,然后找到:

注册表键: HKEY_LOCAL_MACHINE\SYSTEM\Setup\MoSetup
在里面创建名为“AllowUpgradesWithUnsupportedTPMOrCPU”的项
然后创建类型为 REG_DWORD 的值
并填入值:1

如果你不想手动操作注册表,也可以复制下面的一整段代码 (来源),保存为 .bat 文件,然后「使用管理员权限运行」执行 PowerShell,即可跳过 TPM 2.0 或 CPU 最低配置的检查。之后再通过 ISO 或在线进行升级。

@(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
#:: v2 of the toggle script comes to the aid of outliers for whom v1 did not work due to various reasons (broken/blocked/slow wmi)
#:: uses IFEO instead to attach to the same Virtual Disk Service Loader process running during setup, then launches a cmd erase
#:: of appraiserres.dll - but it must also do some ping-pong renaming of the exe in system32\11 - great implementation nonetheless
#:: (for simplicity did not use powershell invoking CreateProcess and DebugActiveProcessStop to overcome IFEO constrains)
#:: in v2 the cmd window will briefly flash while running diskmgmt - so it is not "better" per-se. just more compatible / reactive
#:: 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

$_Paste_in_Powershell = {
$N = 'Skip TPM Check on Dynamic Update'
$0 = sp 'HKLM:\SYSTEM\Setup\MoSetup' 'AllowUpgradesWithUnsupportedTPMOrCPU' 1 -type dword -force -ea 0
$B = gwmi -Class __FilterToConsumerBinding -Namespace 'root\subscription' -Filter "Filter = ""__eventfilter.name='$N'""" -ea 0
$C = gwmi -Class CommandLineEventConsumer -Namespace 'root\subscription' -Filter "Name='$N'" -ea 0
$F = gwmi -Class __EventFilter -NameSpace 'root\subscription' -Filter "Name='$N'" -ea 0
if ($B) { $B | rwmi } ; if ($C) { $C | rwmi } ; if ($F) { $F | rwmi }
$C = "cmd /q $N (c) AveYo, 2021 /d/x/r>nul (erase /f/s/q %systemdrive%\`$windows.~bt\appraiserres.dll"
$C+= '&md 11&cd 11&ren vd.exe vdsldr.exe&robocopy "../" "./" "vdsldr.exe"&ren vdsldr.exe vd.exe&start vd -Embedding)&rem;'
$K = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\vdsldr.exe'
if (test-path $K) {ri $K -force -ea 0; write-host -fore 0xf -back 0xd "`n $N [REMOVED] run again to install "; timeout /t 5}
else {$0=ni $K; sp $K Debugger $C -force; write-host -fore 0xf -back 0x2 "`n $N [INSTALLED] run again to remove ";timeout /t 5}
} ; start -verb runas powershell -args "-nop -c & {`n`n$($_Paste_in_Powershell-replace'"','\"')}"
$_Press_Enter
#::

推荐阅读