Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 2 tasks
Sherry520 opened this issue Nov 16, 2024 · 6 comments
Open
1 of 2 tasks

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

Sherry520 opened this issue Nov 16, 2024 · 6 comments

Comments

@Sherry520
Copy link

Windows Version

Microsoft Windows [版本 10.0.19045.4780]

WSL Version

2.3.26

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

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 #11697 (comment),
Then I ran wsl --update again, another error occurred:

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

Diagnostic Logs

wsl-install-logs.txt

Copy link

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 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, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] 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
Copy link
Author

.\collect-wsl-logs.ps1

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

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

Copy link

Diagnostic information
.wslconfig found
Detected appx version: 2.3.26.0
Detected user visible error: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG

@Sherry520
Copy link
Author

By reference this method: #12278 (comment), 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 "系统类型".

Sherry520 added a commit to Sherry520/WSL that referenced this issue Nov 17, 2024
microsoft#12282 (comment) 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 "系统类型".
@S-t-e-v-e-e
Copy link

通过引用此方法:#12278(注释),显示错误 “Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG”。但是对于中文用户来说,powershell 中还需要额外的操作:

中文语言用户参考以下我修改后的命令: (对于其他非英语用户,请查看相应的语言编号)

# 修改界面语言为英文
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

需要注意的事项:

每次更新 wsl 版本时,都会发生此错误。我想知道“wsl --update”命令是否有问题,以及某些代码是否仅对英语界面有效。该脚本无法解析操作中的“系统类型” '$systeminfo = & systeminfo |findstr /C:“System Type”' 由于语言问题。在中文界面环境中,“System Type” 是中文的 “系统类型”。install-latest-wsl.ps1

By reference this method: #12278 (comment), 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 "系统类型".

Failed to determine system type ($systeminfo)
所在位置 C:\Users\ \install-latest-wsl.ps1:18 字符: 5

  • throw 'Failed to determine system type ($systeminfo)'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Failed to deter...e ($systeminfo):String) [], RuntimeException
    • FullyQualifiedErrorId : Failed to determine system type ($systeminfo)

@jokerclay
Copy link

通过引用此方法:#12278(注释),显示错误 “Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG”。但是对于中文用户来说,powershell 中还需要额外的操作:
中文语言用户参考以下我修改后的命令: (对于其他非英语用户,请查看相应的语言编号)

# 修改界面语言为英文
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

需要注意的事项:

每次更新 wsl 版本时,都会发生此错误。我想知道“wsl --update”命令是否有问题,以及某些代码是否仅对英语界面有效。该脚本无法解析操作中的“系统类型” '$systeminfo = & systeminfo |findstr /C:“System Type”' 由于语言问题。在中文界面环境中,“System Type” 是中文的 “系统类型”。install-latest-wsl.ps1

By reference this method: #12278 (comment), 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 "系统类型".

Failed to determine system type ($systeminfo) 所在位置 C:\Users\ \install-latest-wsl.ps1:18 字符: 5

  • throw 'Failed to determine system type ($systeminfo)'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Failed to deter...e ($systeminfo):String) [], RuntimeException
    • FullyQualifiedErrorId : Failed to determine system type ($systeminfo)

产生throw 'Failed to determine system type ($systeminfo)'原因

install-latest-wsl.ps1 脚本想拿到你的系统信息去下载对应体系架构 wsl 版本,但脚本没拿到

@Sherry520 提了 pr : Update install-latest-wsl.ps1

我们暂时解决方案

  1. 通过 systeminfo | ForEach-Object { Write-Host $_ } 查到我们的系统信息
  2. 找到 系统类型 那一行,如我的系统: 系统类型: x64-based PC 复制下来
  3. 打开 install-latest-wsl.ps1 脚本,把变量 $systeminfo 的值改为 "系统类型: x64-based PC" 字符串即可。
    即:
#$systeminfo = & systeminfo | findstr /C:"System Type"  # 注释掉改行,系统类型应为你自己的系统类型
$systeminfo = "系统类型:         x64-based PC"
  1. 执行脚本即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants