I set some post-build commands in Visual Studio 2017 that should allow me to run a program that I currently have in System32 (wsl.exe). However, Visual Studio doesn't see the program.
I tried to set the command to dir C:\Windows\System32\
to see all the files it could list, and in fact it doesn't list over a 1'000 files out of the around 4'600 files I have there, including the wsl.exe
file I'm trying to run. The number of files show up correctly when running the same command in the command prompt.
I've tried to run whoami
as the post-build command, and it returns the same user as if I run the same command in the command prompt.
Am I missing something?
wsl
is the Windows Subsystem for Linux. It's not just any executable. You can run it from any folder though, as it's in the path. Just typewsl
. – Biotawsl
file at all when executing thedir
command with it. I know I can run it from any folder, and because it was throwing the error"wsl is not recognized as an internal or external command, operable program or batch file."
I've tried more steps and came to the conclusion that runningdir
in the post-build commands, it didn't show all the files in the directory. All of this while I can see the file correctly using the Windows command prompt – Butterfliesdir
is a command-line command. You are asking why you can't see some files in System32, without specifying what those files are. 3) Whatwsl
? Does it even exist? Is it installed? Are you trying to start a Unix shell from your post-build step? – Biotadir
command in VS does not show the wsl.exe file, while runningls -al /mnt/c/Windows/System32
in WSL shows it, and in command prompt running `dir C:\Windows\System32` shows it as well. For your number 3): I've clarified that in the post saying that indeed I currently have in System32 (wsl.exe), so yes, it does exist. – Butterflies