-
Notifications
You must be signed in to change notification settings - Fork 860
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
The system cannot find the specified file. #11877
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
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 View similar issuesPlease 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! Open similar issues:
Closed similar issues:
|
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')
}
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."
The text was updated successfully, but these errors were encountered: