user310291 user310291 - 1 year ago 138
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 ?

Answer Source

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","")
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download