Closed 1774298958 closed 3 months ago
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.
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!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
WSL logs have been pasted
.
Windows Version
Microsoft Windows 11 10.0.22631
WSL Version
0.0.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
No response
Distro Version
/
Other Software
/
Repro Steps
After uninstalling the WSL related application with a third-party tool, reinstalling the WSL related additional programs and updating and repairing the system still cannot solve this problem
Expected Behavior
wsl
Actual Behavior
wsl The system cannot find the specified file.
Diagnostic Logs
Requires -RunAsAdministrator
[CmdletBinding()] Param ( $LogProfile = $null, [switch]$Dump = $false )
Set-StrictMode -Version Latest
$folder = "WslLogs-" + (Get-Date -Format "yyyy-MM-dd_HH-mm-ss") mkdir -p $folder | Out-Null
if ($LogProfile -eq $null -Or ![System.IO.File]::Exists($LogProfile)) { if ($LogProfile -eq $null) { $url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl.wprp" } elseif ($LogProfile -eq "storage") { $url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_storage.wprp" } else { Write-Error "Unknown log profile: $LogProfile" exit 1 }
}
reg.exe export HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss $folder/HKCU.txt 2>&1 | Out-Null reg.exe export HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Lxss $folder/HKLM.txt 2>&1 | Out-Null reg.exe export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\P9NP $folder/P9NP.txt 2>&1 | Out-Null reg.exe export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2 $folder/Winsock2.txt 2>&1 | Out-Null reg.exe export "HKEY_CLASSES_ROOT\CLSID{e66b0f30-e7b4-4f8c-acfd-d100c46c6278}" $folder/wslsupport-proxy.txt 2>&1 | Out-Null reg.exe export "HKEY_CLASSES_ROOT\CLSID{a9b7a1b9-0671-405c-95f1-e0612cb4ce7e}" $folder/wslsupport-impl.txt 2>&1 | Out-Null
Get-Service wslservice -ErrorAction Ignore | Format-list * -Force > $folder/wslservice.txt
$wslconfig = "$env:USERPROFILE/.wslconfig" if (Test-Path $wslconfig) { Copy-Item $wslconfig $folder | Out-Null }
get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -ErrorAction Ignore > $folder/appxpackage.txt get-acl "C:\ProgramData\Microsoft\Windows\WindowsApps" -ErrorAction Ignore | Format-List > $folder/acl.txt Get-WindowsOptionalFeature -Online > $folder/optional-components.txt bcdedit.exe > $folder/bcdedit.txt
$wprOutputLog = "$folder/wpr.txt"
wpr.exe -start $LogProfile -filemode 2>&1 >> $wprOutputLog if ($LastExitCode -Ne 0) { Write-Host -ForegroundColor Yellow "Log collection failed to start (exit code: $LastExitCode), trying to reset it." wpr.exe -cancel 2>&1 >> $wprOutputLog
}
try { Write-Host -NoNewLine "Log collection is running. Please " Write-Host -NoNewLine -ForegroundColor Red "reproduce the problem " Write-Host -NoNewLine "and once done press any key to save the logs."
} finally { wpr.exe -stop $folder/logs.etl 2>&1 >> $wprOutputLog }
if ($Dump) { $Assembly = [PSObject].Assembly.GetType('System.Management.Automation.WindowsErrorReporting') $DumpMethod = $Assembly.GetNestedType('NativeMethods', 'NonPublic').GetMethod('MiniDumpWriteDump', [Reflection.BindingFlags] 'NonPublic, Static')
}
$logArchive = "$(Resolve-Path $folder).zip" Compress-Archive -Path $folder -DestinationPath $logArchive Remove-Item $folder -Recurse
Write-Host -ForegroundColor Green "Logs saved in: $logArchive. Please attach that file to the GitHub issue."