[autoit]
Func vpn_disconnect()
$date = @MDAY & "." & @MON & "_" & @HOUR & "_" & @MIN & "_" & @SEC & ".txt"
$vpndir = "C:\Temp\VPN\logs\log_" & $date
$foo = Run("C:\Program Files (x86)\Cisco Systems\VPN Client\vpnclient.exe disconnect", @SystemDir, @SW_SHOW, $STDIN_CHILD + $STDOUT_CHILD)
StdinWrite($foo,"echo %errorlevel%") ;soll returncode ausgeben - Machts aber net ![]()
StdinWrite($foo)
While 1
$line = StdoutRead($foo)
If $line <> "" Then
Filewrite($vpndir,$line)
ExitLoop
EndIf
WEnd
Endfunc