microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.47k stars 822 forks source link

错误代码: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG #12282

Open Sherry520 opened 1 day ago

Sherry520 commented 1 day ago

Windows Version

Microsoft Windows [版本 10.0.19045.4780]

WSL Version

2.3.26

Are you using WSL 1 or WSL 2?

Kernel Version

No response

Distro Version

No response

Other Software

No response

Repro Steps

wsl --update

Expected Behavior

I expected it would update to 2.3.26 successfully.

Actual Behavior

When I updated for the first time, an error occurred: Could not write value to key \SOFTWARE\Classes\Drive\shell\WSL,and with a log file. Then I followed the solution as shown in https://github.com/microsoft/WSL/issues/11697#issuecomment-2168104220, Then I ran wsl --update again, another error occurred:

没有注册类
错误代码: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG

Diagnostic Logs

wsl-install-logs.txt

github-actions[bot] commented 1 day ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Sherry520 commented 1 day ago
.\collect-wsl-logs.ps1

wsl --update
没有注册类
错误代码: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG

WslLogs-2024-11-16_14-51-44.zip

github-actions[bot] commented 1 day ago
Diagnostic information ``` .wslconfig found Detected appx version: 2.3.26.0 Detected user visible error: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG ```
Sherry520 commented 8 hours ago

By reference this method: https://github.com/microsoft/WSL/issues/12278#issuecomment-2479699777, sovled error "Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG". But for Chinese language users, additional operations are required in powershell:

中文语言用户参考以下我修改后的命令: (For other non-English users, check the corresponding language number)

# 修改界面语言为英文
chcp 437

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/triage/install-latest-wsl.ps1" -OutFile install-latest-wsl.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\install-latest-wsl.ps1

# 修改界面语言为中文
chcp 936

Things to note:

This error happens every time the wsl version is updated. I wonder if there is a problem with the 'wsl --update' command and if some of the code is only valid for the English language interface. The install-latest-wsl.ps1 script cannot parse the operating "System Type" '$systeminfo = & systeminfo | findstr /C:"System Type"' due to language problems. In the Chinese interface environment, "System Type" is the Chinese "系统类型".