Failed to delete child registry keys HRESULT = 0x80070005 - E_ACCESSDENIED

2024-04-16 21:12:15 浏览数 (1)

在给win7或2008r2 iso集成KB3020369、KB3125574时遇到:

Failed to delete child registry keys: Microsoft-Hyper-V-Integration-Services-Package~31bf3856ad364e35~amd64~~6.3.9600.17388 [HRESULT = 0x80070005 - E_ACCESSDENIED]

为什么要集成这2个补丁,我在这篇文档开头有介绍背景:https://cloud.tencent.com/developer/article/2372545

因为Win7/2008R2远程分辨率字太小,需要调整DPI缩放,需要这2个补丁才行。

集成KB3020369很顺利,集成KB3125574时报错如上,详细的报错信息C:WindowsLogsDISMdism.log里很长,关键的就是我贴的那个,网查有跟我遇到一模一样问题的网友

https://www.ntlite.com/community/index.php?threads/are-e_accessdenied-cbs-errors-on-cleanup-tasks-normal-for-offline-servicing-or-harmless-side-effect-of-ntlites-behavior.2220/

https://textbin.net/raw/p6lzp0dork 是同样问题的dism.log日志,打开看了下,跟我遇到的问题一模一样,但是没有解决方案

既然报错信息是删除失败,那干脆我手动删除算了

删除很简单:本人把install.wim挂到了B:boot

代码语言:powershell复制
Dism /Mount-Image /ImageFile:"B:Win7tmpsourcesinstall.wim" /index:1 /MountDir:"B:boot"

于是去b:bootwindowssystem32config找SOFTWARE,打开注册表加载配置单元,挂到HKLM下面名为sssss

于是用Registry Workshop在HKLMsssss下面搜Microsoft-Hyper-V-Integration-Services-Package

搜到了3条

代码语言:txt复制
HKEY_LOCAL_MACHINEsssssMicrosoftWindowsCurrentVersionComponent Based ServicingApplicabilityEvaluationCacheMicrosoft-Hyper-V-Integration-Services-Package~31bf3856ad364e35~amd64~~6.3.9600.17388
HKEY_LOCAL_MACHINEsssssMicrosoftWindowsCurrentVersionComponent Based ServicingApplicabilityEvaluationCacheMicrosoft-Hyper-V-Integration-Services-Package~31bf3856ad364e35~amd64~~6.3.9600.17681
HKEY_LOCAL_MACHINEsssssMicrosoftWindowsCurrentVersionComponent Based ServicingApplicabilityEvaluationCacheMicrosoft-Hyper-V-Integration-Services-Package~31bf3856ad364e35~amd64~~6.3.9600.17903

报错信息里只涉及第1条,于是提权删掉第1条

提权后执行

代码语言:powershell复制
Remove-Item -Path "HKLM:sssssMicrosoftWindowsCurrentVersionComponent Based ServicingApplicabilityEvaluationCacheMicrosoft-Hyper-V-Integration-Services-Package~31bf3856ad364e35~amd64~~6.3.9600.17388"

删除后则卸载配置单元

删除后则卸载配置单元

删除后则卸载配置单元

然后再继续集成

代码语言:powershell复制
mkdir -force b:temp
cmd.exe /c expand -f:* "B:win7packageswindows6.1-kb3020369-x64.msu" "b:temp"
dism /Image:"B:boot" /add-package /packagepath:"Windows6.1-KB3020369-x64.cab"
cmd.exe /c expand -f:* "B:win7packageswindows6.1-kb3125574-v4-x64.msu" "b:temp"
dism /Image:"B:boot" /add-package /packagepath:"b:tempWindows6.1-KB3125574-v4-x64.cab"

0 人点赞