user310291 user310291 - 1 month ago 10
Bash Question

Capture output value from a shell command in VBA?

Found this function

But would need also to capture output from the shell output. Any code suggestion ?


You can CreateProcess the application redirecting its StdOut to a pipe, then read that pipe directly;

dim resp as string 
resp = redirect("cmd","/c dir")
resp = redirect("ipconfig","")