Start WSL from TC toolbar
Moderators: Hacker, petermad, Stefan2, white
Start WSL from TC toolbar
I installed WSL on my machine and now I would like to have a command in the TC toolbar to start it.
Problem is, that to run wsl, I can simply navigate with the Explorer to C:\Windows\System32 and double-click wsl.exe. Other option is to open a command box and type wsl. Both work.
If I just set the command for the TC toolbar to 'wsl.exe' it does nothing. Ditto when fully qualified. This is because wsl.exe is not really located in C:\Windows\System32, but Windows shows it as if it is there. Virtual filesystem stuff. When I open the folder with TC, the command is not there (windows says there are 4705 items in the folder, whereas TC can see 2338).
When I search my filesystem for wsl.exe I can find one in (hold on tight)
"c:\Windows\WinSxS\amd64_microsoft-windows-lxss-wsl_31bf3856ad364e35_10.0.18362.239_none_d8d55499606e362e\wsl.exe"
but this looks pretty specific for my particular machine and not really portable.
Is there a way to start WSL from the TC toolbar?
Problem is, that to run wsl, I can simply navigate with the Explorer to C:\Windows\System32 and double-click wsl.exe. Other option is to open a command box and type wsl. Both work.
If I just set the command for the TC toolbar to 'wsl.exe' it does nothing. Ditto when fully qualified. This is because wsl.exe is not really located in C:\Windows\System32, but Windows shows it as if it is there. Virtual filesystem stuff. When I open the folder with TC, the command is not there (windows says there are 4705 items in the folder, whereas TC can see 2338).
When I search my filesystem for wsl.exe I can find one in (hold on tight)
"c:\Windows\WinSxS\amd64_microsoft-windows-lxss-wsl_31bf3856ad364e35_10.0.18362.239_none_d8d55499606e362e\wsl.exe"
but this looks pretty specific for my particular machine and not really portable.
Is there a way to start WSL from the TC toolbar?
Re: Start WSL from TC toolbar
Do you use 32-bit TC on 64-bit win10?
See
Windows x64: Explorer vs TC: Content of System32 different >>> viewtopic.php?f=3&t=25743
See
Windows x64: Explorer vs TC: Content of System32 different >>> viewtopic.php?f=3&t=25743
Re: Start WSL from TC toolbar
Yes, 32 bit. I have some plugins that don't run in the 64bit version
Edit: dang, when I run TC64 I can see wsl.exe and even run it. Hmm, but now my plugins don't work no more.
Edit: dang, when I run TC64 I can see wsl.exe and even run it. Hmm, but now my plugins don't work no more.
Last edited by p.tingen on 2020-08-26, 13:37 UTC, edited 2 times in total.
Re: Start WSL from TC toolbar
Then read the above link to understood what Microsoft wants you to know, or google for it.
In short
C:\Windows\System32 ....> 64-bit "System32"-Folder with 64-bit exe and dlls , normal for 64-bit applications (on 64-bit WindowsTM)
C:\Windows\SysNative ....> 64-bit "System32"-Folder with 64-bit exe and dlls , access for 32-bit applications (on 64-bit WindowsTM)
C:\Windows\SysWOW64 ..> 32-bit "System32"-Folder with 32-bit exe and dlls like on 32-bit WindowsTM
I don't remember if you have to create the "SysNative"-Folder yourself first, or if it is enough to just refer to it (e.g. in TCs Button)
But on default that folder is not existent and so you have no access from an 32-bit application to that 32-bit "System32"-Folder.
EDIT: see post below >>>
In short
C:\Windows\System32 ....> 64-bit "System32"-Folder with 64-bit exe and dlls , normal for 64-bit applications (on 64-bit WindowsTM)
C:\Windows\SysNative ....> 64-bit "System32"-Folder with 64-bit exe and dlls , access for 32-bit applications (on 64-bit WindowsTM)
C:\Windows\SysWOW64 ..> 32-bit "System32"-Folder with 32-bit exe and dlls like on 32-bit WindowsTM
I don't remember if you have to create the "SysNative"-Folder yourself first, or if it is enough to just refer to it (e.g. in TCs Button)
But on default that folder is not existent and so you have no access from an 32-bit application to that 32-bit "System32"-Folder.
EDIT: see post below >>>
Re: Start WSL from TC toolbar
After reading the thread you pointed to, I now use TC32 again and refer to c:\Windows\Sysnative\wsl.exe and that works. I did not create it myself so I guess it just exists.
Anyway, this seems to work. Thanks!
Anyway, this seems to work. Thanks!
Re: Start WSL from TC toolbar
Thanks for testing.
That's what I had want to remember:
There are also some related INI settings.
x64DisableRedirection=0
1: Disable the redirection of windows\system32 to windows\syswow64 directory on 64-bit Windows versions.
Can have some negative side effects like non-working plugins.
X64menu= Show 'x64' submenu in context menu ('x32' in 64-bit version), default =1 in 32-bit only
That's what I had want to remember:
History.txt wrote:12.05.09 Release Total Commander 7.50 Public Beta 3
03.05.09 Added: Vista 64bit: Show pseudo-subdirectory "sysnative" in Windows folder to allow to reach 64-bit system32 directory
There are also some related INI settings.
x64DisableRedirection=0
1: Disable the redirection of windows\system32 to windows\syswow64 directory on 64-bit Windows versions.
Can have some negative side effects like non-working plugins.
X64menu= Show 'x64' submenu in context menu ('x32' in 64-bit version), default =1 in 32-bit only
Re: Start WSL from TC toolbar
Ah, now I see, "sysnative" is a pseudo folder, created by TC.
Gee, with both Windows and TC adding pseudo folders, it's a game of who is fooling who...
Gee, with both Windows and TC adding pseudo folders, it's a game of who is fooling who...
Re: Start WSL from TC toolbar
To be clear:
"sysnative" is a concept of Microsoft, where the user have to create that real folder by itself if needed,
to make that redirection (access to 64-bit system32-folder for 32-bit apps) work for him.
But since 2009 TC will do that internally and transparently for you.
"sysnative" is a concept of Microsoft, where the user have to create that real folder by itself if needed,
to make that redirection (access to 64-bit system32-folder for 32-bit apps) work for him.
But since 2009 TC will do that internally and transparently for you.
Re: Start WSL from TC toolbar
You can use the command cm_SwitchX64Redirection to toggle the redirection on the fly.There are also some related INI settings.
x64DisableRedirection=0
1: Disable the redirection of windows\system32 to windows\syswow64 directory on 64-bit Windows versions.
Can have some negative side effects like non-working plugins.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar