halfbebi Posted February 19, 2021 Share Posted February 19, 2021 Hello, I'm new here and please help me migrate this example of .bat in autoit @echo off echo Wait ... taskkill /IM "ipsecc.exe" /t /f >nul 2>nul ping 127.0.0.0 -n 5 >nul start "Connecting..." /min /b "%ProgramFiles%\ShrewSoft\VPN Client\ipsecc.exe" -r "PROFILE" -u USERNAME -p PASSWORD -a >nul 2>nul thank you in advance Link to comment Share on other sites More sharing options...
Subz Posted February 19, 2021 Share Posted February 19, 2021 Have a look at the Process and RunAs functions. Link to comment Share on other sites More sharing options...
halfbebi Posted February 19, 2021 Author Share Posted February 19, 2021 I can't run a simple .exe, where am I wrong? RunAs ("ipsecc.exe", "D:\Program Files\ShrewSoft\VPN Client\") sorry Link to comment Share on other sites More sharing options...
halfbebi Posted February 19, 2021 Author Share Posted February 19, 2021 "The filename, directory name, or volume label syntax is incorrect" Link to comment Share on other sites More sharing options...
Marc Posted February 19, 2021 Share Posted February 19, 2021 Help file says: RunAs ( "username", "domain", "password", logon_flag, "program" [, "workingdir" [, show_flag [, opt_flag]]] ) So you're trying to run nothing with user ipsecc.exe with domain d:\program files... don't know the program you are using, but #include <process.au3> _RunDos('"D:\Program Files\ShrewSoft\VPN Client\ipsecc.exe" -r "PROFILE" -u USERNAME -p PASSWORD -a') or ShellExecute ("D:\Program Files\ShrewSoft\VPN Client\ipsecc.exe", '-r "PROFILE" -u USERNAME -p PASSWORD -a', ""D:\Program Files\ShrewSoft\VPN Client\ipsecc.exe") should be the right direction. Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
halfbebi Posted February 19, 2021 Author Share Posted February 19, 2021 (edited) thanks, the program opens, but does not automatically take the username and password - it must be entered thanks a lot Edited February 19, 2021 by Jos removed formatting Link to comment Share on other sites More sharing options...
Somerset Posted February 19, 2021 Share Posted February 19, 2021 Will you use the standard forums font size. This tiny writing can get very annoying for some. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now