vtkExecutableRunner : ported to Windows ?

I am able to run the command “echo HELLO WORLD” via vtkExecutableRunner on Linux but not on Windows. I get the following errors. Any suggestion as to how I might be able to fix it ?

2021-12-26 14:54:06.152 (   0.012s) [                ]vtkExecutableRunner.cxx:161    ERR| vtkExecutableRunner (000001B0BC4EBB60): Child process administration error: The system cannot find the file specified
runner->GetStdOut() =
runner->GetStdErr() =


Program execution is vastly different between Unix and Windows world, and the vtkExecutableRunner class does not wrap these differences. This class just assum the program you try to launch is in the PATH and nothing else. On Linux there are builtin commands such as echo, but on windows there is no such thing.

To be able to run a command on Windows one must encapsulate it around a shell, like so :

cmd.exe /c \"echo Hello World\"

See https://gitlab.kitware.com/vtk/vtk/-/blob/master/Common/System/Testing/Cxx/TestExecutableRunner.cxx for an example.

1 Like