Sign in to follow this  
Followers 0
level20peon

run() openvpn and $STDOUT_CHILD -> openvpn doesn't start at all

3 posts in this topic

#1 ·  Posted (edited)

My script looks like this:

#include <Constants.au3>
Run('"C:\Program Files\OpenVPN\bin\openvpn.exe" "D:\config\tunnel.ovpn"','C:\Program Files\OpenVPN\bin\',@SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)

which opens a DOS Window and closes shortly thereafter without actually starting OpenVPN.

Run('"C:\Program Files\OpenVPN\bin\openvpn.exe" "D:\config\tunnel.ovpn"','C:\Program Files\OpenVPN\bin\',@SW_SHOW)

works like intended.

What am I doing wrong ?

Edited by level20peon

Share this post


Link to post
Share on other sites



Maybe try

Run( @ComSpec & ' /c ' & '"C:\Program Files\OpenVPN\bin\openvpn.exe" "D:\config\tunnel.ovpn"','C:\Program Files\OpenVPN\bin\',@SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It didn't make a difference.

Edit:

I created a workaround for now but if anybody knows how to get a handle on my original code I would be pleased to learn about it.

workaround:

$run = Run('cmd.exe','D:\config\',@SW_HIDE,1+2+4)
StdinWrite($run,'"C:\Program Files\OpenVPN\bin\openvpn.exe" "D:\config\tunnel.ovpn"' & @CRLF)
Edited by level20peon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0