Fri Jun 30 02:21:11 PM CEST 2023
-
Windows 11 explorer.exe (and any other application running on Windows) is not being able to browse additionally mounted WSL2 directories.
-
The problem seems to be caused by Windows'
User Account Control
(UAC) and may appear after a Windows update without manually changing any setting.
-
As mentioned here microsoft/WSL#7834 (comment), the issue is fixed by disabling UAC and rebooting Windows.
-
What is not mentioned in the above issue, is, that the issue will still be fixed after UAC is enabled again after disabling it.
-
So, in other words:
- Disable UAC:
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
- Reboot
- Enable UAC:
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
- Reboot
- Windows applications should be able to access WSL mounts normally again.