Start WSL from TC toolbar

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
p.tingen
Junior Member
Junior Member
Posts: 23
Joined: 2007-09-25, 05:52 UTC
Location: Netherlands

Start WSL from TC toolbar

Post by *p.tingen »

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?
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Start WSL from TC toolbar

Post by *Stefan2 »

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




 
p.tingen
Junior Member
Junior Member
Posts: 23
Joined: 2007-09-25, 05:52 UTC
Location: Netherlands

Re: Start WSL from TC toolbar

Post by *p.tingen »

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.
Last edited by p.tingen on 2020-08-26, 13:37 UTC, edited 2 times in total.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Start WSL from TC toolbar

Post by *Stefan2 »

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 >>>



 
p.tingen
Junior Member
Junior Member
Posts: 23
Joined: 2007-09-25, 05:52 UTC
Location: Netherlands

Re: Start WSL from TC toolbar

Post by *p.tingen »

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!
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Start WSL from TC toolbar

Post by *Stefan2 »

Thanks for testing.



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




 
p.tingen
Junior Member
Junior Member
Posts: 23
Joined: 2007-09-25, 05:52 UTC
Location: Netherlands

Re: Start WSL from TC toolbar

Post by *p.tingen »

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...
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Start WSL from TC toolbar

Post by *Stefan2 »

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.



 
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Start WSL from TC toolbar

Post by *petermad »

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.
You can use the command cm_SwitchX64Redirection to toggle the redirection on the fly.
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
Post Reply