[英]The taskbar freezes after clicking to language bar on windows 11 (keyboard added via PowerShell)
再會。 我的目標是使用登錄 PowerShell 腳本為域中的新用戶添加鍵盤:這是 PowerShell 代碼:
$LanguageList = Get-WinUserLanguageList
$LanguageList.Add("ru-RU")
Set-WinUserLanguageList $LanguageList -Force
鍵盤添加成功,但我無法點擊語言欄。 我只能使用組合鍵更改語言。 有趣的是,單擊語言欄后,任務欄和一些 windows 用戶界面卡住了,除了資源管理器,直到我單擊桌面或資源管理器。
此后,事件查看器中出現錯誤: “激活 Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy.App 失敗:錯誤代碼。Class 未注冊:激活階段:未定義階段”
我還嘗試通過在注冊表“Keyboard Layaout\Preload”中添加一條記錄來添加鍵盤。 但如果我添加自定義鍵盤布局,上述行為也會出現。 我喜歡上面的方法,因為鍵盤也出現在設置中,而不僅僅是在語言欄中。
如果我刪除從上面的登錄腳本添加的鍵盤並通過界面再次添加它,一切正常。
如果直接在 PowerShell 中為登錄用戶運行,上面的代碼工作正常。
你對克服這個有什么想法嗎?
先感謝您。
亞歷克斯
在上一篇文章中找到了解決方案:
錯誤 Windows Shell Experience 和 Cortana
運行以下腳本后,任務欄對機器中的所有用戶照常工作。 每次刪除域用戶后都需要運行它。
taskkill /F /IM explorer.exe
taskkill /F /IM ShellExperienceHost.exe
taskkill /F /IM StartMenuExperiencehost.exe
taskkill /F /IM SearchUI.exe
taskkill /F /IM RunTimeBroker.exe
Start-Sleep 3
cd $Env:localappdata\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy
Remove-Item -Recurse -Force .\TempState\
cd $Env:localappdata\Packages\Microsoft.Windows.StartMenuExperiencehost_cw5n1h2txyewy
Remove-Item -Recurse -Force .\TempState\
cd $Env:localappdata\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy
Remove-Item -Recurse -Force .\TempState\
Add-AppxPackage -register "C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy\AppxManifest.xml" -DisableDevelopmentMode
Add-AppxPackage -register "C:\Windows\SystemApps\StartMenuExperiencehost_cw5n1h2txyewy\AppxManifest.xml" -DisableDevelopmentMode
Add-AppxPackage -register "C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\AppxManifest.xml" -DisableDevelopmentMode
Start-Sleep 3
Start-Process "RunTimeBroker.exe"
Start-Process "SearchUI.exe"
Start-Process "StartMenuExperiencehost.exe"
Start-Process "ShellExperienceHost.exe"
Start-Process "explorer.exe"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.