Open adrianghc opened 5 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
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. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Thank you @adrianghc. We've made some installation fixes in 2.2.1, can you try upgrading and see if the icon is still there ?
If so, can you share a screenshot of it's property page ?
Unfortunately, 2.2.1 doesn't fix this. Also unfortunately, you cannot open the icon's property menu, as that results in this error:
"The properties of this element are not available."
Thank you @adrianghc. Does the icon go away if you run wsl.exe --uninstall ?
Yes, it does.
Ok good. Can you capture a full installing trace by downloading the msi and running:
(as administrator)
msiexec /i <path-to-msi> /L*VX C:\wsllogs.txt
And then check if that re-created the shortcut and if so, share the trace ?
This does indeed create the shortcut. I have attached the log file.
Thank you @adrianghc. I have a theory:
Does opening regedit.exe and deleting HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}
gets you rid of the shortcut ?
This is exactly correct. 👍
Ok that's the icon I was thinking from. Can you share the content of HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}
? That's probably where something is messed up.
Oh, I have another theory: Is your system main drive installed on C:\ ? Does C:\Windows\System32\windows.storage.dll
exist ?
This is the content of HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}
:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}]
@="Linux"
"SortOrderIndex"=dword:00000077
"System.IsPinnedToNameSpaceTree"=dword:00000001
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\DefaultIcon]
@="C:\\Windows\\System32\\wsl.exe,-1"
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\InProcServer32]
@="C:\\Windows\\System32\\windows.storage.dll"
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\Instance]
"CLSID"="{4FE04BFD-85B9-49DD-B914-F4C9556B9DA6}"
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\Instance\InitPropertyBag]
"DisplayType"=dword:00000002
"EnumObjectsTelemetryValue"="WSL"
"Provider"="Plan 9 Network Provider"
"ResName"="\\\\wsl.localhost"
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\ShellFolder]
"Attributes"=dword:a080004d
"FolderValueFlags"=dword:00000028
Is your system main drive installed on C:\ ? Does
C:\Windows\System32\windows.storage.dll
exist ?
Yes and yes.
Hmm this all looks correct.
What's the content of HKEY_CLASSES_ROOT\CLSID\{4FE04BFD-85B9-49DD-B914-F4C9556B9DA6}\ShellFolder
?
Also another question: Is the "Windows subsystem for Linux" optional component enabled ?
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{4FE04BFD-85B9-49DD-B914-F4C9556B9DA6}\ShellFolder]
"FolderValueFlags"=dword:00080000
The optional component is not installed on this machine, but it is on my other machine where the icon does not appear (the machine I mention in the last paragraph of the original post). You might be onto something there...
Thank you @adrianghc. This all looks correct.
Unfortunately I still can't reproduce the issue with the optional component enabled or disabled. Does enabling the optional component and then rebooting make the icon disappear ?
Yes, that is indeed exactly what happens (though it also disappears from the File Explorer sidebar then).
Hmm I guess that does makes sense since that would overwrite the registry keys. If you uninstall and then reinstall WSL with the optional component enabled, does the icon come back ?
It does not come back in this case. And that would explain the difference between my two machines.
This happened to me out of the blue, having uninstalled WSL, the Linux icon re-appeared, and clicking upon it had Windows 11 complain at me that 'WSL components were missing'. I had to either recreate the registry entry, or uninstall WSL with wsl.exe --uninstall
- I chose the latter.
This happened to me out of the blue, having uninstalled WSL, the Linux icon re-appeared, and clicking upon it had Windows 11 complain at me that 'WSL components were missing'. I had to either recreate the registry entry, or uninstall WSL with
wsl.exe --uninstall
- I chose the latter.
Woa thanks, that helped in my case. In the past I tested WSL but uninstalled it. The icon re-appeared after I fiddled arround with networkdrives.
Ok, it just happened for me. I found WSL was installed by MS Store few minutes before this scary little Penguin appeared on my desktop. I ran all Anti Virus & Malware tools I could think about. Thanks I landed here, and used the mentioned "wsl.exe --uninstall" through Admin Powershell command to get ride of it. Weird this cannot be uninstalled through the MS Store or Windows installed App or Components...
I have the same problem!!!
This is strange, i had to install docker desktop, the installation seems to activate WSL in the "Windows features on/off".
So i removed the registry dword (the workaround), it is not needed when you activate wsl in win features.
I got the "Linux" Explorer sidebar entry and the desktop icon after uninstalling WSL on different machines some months ago.
Both the fixes works for me:
1:
Run wsl.exe --uninstall
again.
If you just uninstalled WSL, you might want to restart Windows before doing so to make sure nothing will interfere.
It will remove the whole HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}
, instead of the pin-point fix below, which keeps that entry intact.
2:
Remove the Explorer sidebar entry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}]
"System.IsPinnedToNameSpaceTree"=dword:00000000
Remove the the desktop icon:
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}]
The icons won't re-appear for me and I didn't test it, since I got the settings sync disabled. If you only got 1 machine synced, then it should be fixed after you deal with it and sync the settings.
Hey you guys. I found the simple way to fix this.
Simply, find the shortcut in the start menu folder in your windows, then delete the appropriate shortcut (wsl) to disappear the icon (linux) in your desktop.
UNSUBSCRIBE
On Fri, Jun 14, 2024, 4:36 PM Danilo A. @.***> wrote:
This is strange, i have to install docker desktop, the installation seems to activate WSL in the "Windows features on/off".
So i removed the registry dword (the workaround), it is not needed when you activate wsl in win features.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/WSL/issues/11347#issuecomment-2168728089, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIZ6L3I2BYAYZLZWSQ7T3LZHNH3ZAVCNFSM6AAAAABFDU7V3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRYG4ZDQMBYHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hey you guys. I found the simple way to fix this.
- click the search box on windows and search "wsl"
- right-click on that wsl icon, then click "Open file location"
- In that folder which contains startmenu, you can find 'wsl' icon which is a shortcut to the wsl.exe in System32 folder.
- delete the shortcut in that folder and then the desktop icon, 'linux' will also be automatically removed.
Simply, find the shortcut in the start menu folder in your windows, then delete the appropriate shortcut (wsl) to disappear the icon (linux) in your desktop.
Not work for me.
Was this ever solved? I got the same issue
This issue is a duplicate of #11325, which was closed prematurely. Please read on.
Windows Version
Microsoft Windows [Version 10.0.22631.3296]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1-2
Distro Version
No response
Other Software
No response
Repro Steps
Install WSL on a new machine through
wsl --install
, through the Microsoft Store or through the MSIX fron GitHub.Expected Behavior
A Linux icon should be added to the File Explorer sidebar and nowhere else (not the desktop).
Actual Behavior
Upon install, a Linux icon appears on the desktop that cannot be removed other than through registry changes (see here). The icon is equivalent to the one on the File Explorer sidebar and takes you to
\\wsl$
. (The icon in the sidebar is still created.)This icon is created before the Ubuntu app package is installed --- it is NOT related to the Ubuntu app package as claimed in #11325. It also created if one only installs WSL through the MSIX and no distribution, or if one selects a different distribution.
This is new and unexpected behavior, as previously, an icon would only be added to the sidebar, not the desktop. It also only happens on new installs. On another machine where WSL has been installed and continually updated (through the Microsoft Store and GitHub) since July 2022, no desktop icon appears even after updating to the latest WSL version.
Diagnostic Logs
No response