错误代码0x800b010a

2023-10-13 13:10:35 浏览数 (1)

离线安装.net framework 4报0x800b010a

参考

https://blog.csdn.net/AndyXia/article/details/75071388

https://msfn.org/board/topic/181915-system-certificates-updater-the-easy-way/

执行下面的powershell代码更新证书,说白了就是更新获取一份最新的根证书,然后再导入到报0x800b010a的机器,不一定用下面的代码,手动下载、手动导入也行

代码语言:javascript复制
$client = new-object System.Net.WebClient
$client.DownloadFile('http://windows-1251783334.cos.ap-shanghai.myzijiebao.com/115.159.148.149/wget64.exe',' c:windowswget.exe')

#del C:WURoots.sst 2>&1 > $null
del C:authroots.sst 2>&1 > $null
del C:roots.sst 2>&1 > $null
del C:updroots.sst 2>&1 > $null

wget.exe http://windowscq-1251783334.cos.ap-chongqing.myzijiebao.com/updroots.exe -O c:windowsupdroots.exe 2>&1 > $null

while(((Test-Path c:authroots.sst) -eq $false) -or ((Test-Path c:roots.sst) -eq $false) -or ((Test-Path c:updroots.sst) -eq $false)){
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authroots.sst -O c:authroots.sst 2>&1 > $null
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/roots.sst -O c:roots.sst 2>&1 > $null
wget.exe http://www.download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/updroots.sst -O c:updroots.sst 2>&1 > $null
}

$Certs = get-childitem Cert:LocalMachineRoot
if((Get-ItemProperty "HKLM:SOFTWAREMicrosoftWindows NTCurrentVersion").ProductName -match "2008 R2|Windows 7"){
#wget.exe http://windowscq-1251783334.cos.ap-chongqing.myzijiebao.com/WURoots.sst -O c:WURoots.sst 2>&1 > $null
$Certs| ForEach-Object {
  $store = Get-Item $_.PSParentPath
  $store.Open('ReadWrite')
  $store.Remove($_)
  $store.Close()
}
}else{
#while( (Test-Path C:WURoots.sst) -eq $false ){
#certutil -generateSSTFromWU C:WURoots.sst 2>&1 > $null
#}
$Certs | %{Remove-Item -path $_.PSPath -recurse -Force}
}

#[UpdRoots -open SrcStore failed=>0x2(2)], replace with https://msfn.org/board/topic/181915-system-certificates-updater-the-easy-way/
#updroots.exe c:WURoots.sst
start-sleep -s 5
updroots c:authroots.sst
start-sleep -s 5
updroots c:roots.sst
start-sleep -s 5
updroots c:updroots.sst
start-sleep -s 5
#certmgr.msc
#del C:WURoots.sst 2>&1 > $null
del C:authroots.sst 2>&1 > $null
del C:roots.sst 2>&1 > $null
del C:updroots.sst 2>&1 > $null

0 人点赞