I am trying to run the Windows 10 Linux Subsystem from Visual Studio 2015's Post-Build Command Line. That is, I have a command, whose output will be piped to bash, for example xyz | bash. bash should in turn start the Windows 10 Linux Subsystem and execute the command.
This works perfectly when running the command from the regular CMD.exe Command Line or .bat files. However, when running this from the Visual Studio 2015 Post-, Pre-Build- or Pre-Link-Event Command Line directly, via a call cmd /C call or an external .bat file as proxy, this fails with error code 255 and prints something like "Command 'bash' not found.". When trying to use the complete path to the bash.exe this fails, too.
How can I run bash from Visual Studio's Command Line?
Sidenote: I am trying to run this on a C/C++ Project.