Created
October 25, 2021 07:18
-
-
Save edihasaj/189db36fcc6fd9916c0b48cf2449f0e6 to your computer and use it in GitHub Desktop.
AnyConnect auto-connect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set WshShell = WScript.CreateObject("WScript.Shell") | |
WshShell.Run """%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe""" | |
WScript.Sleep 2000 | |
WshShell.AppActivate "Cisco AnyConnect Secure Mobility Client" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "VPN_DOMAIN_OR_IP" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "{TAB}" | |
WshShell.SendKeys "{ENTER}" | |
WScript.Sleep 11000 | |
WshShell.SendKeys "VPN_PASSWORD" | |
WshShell.SendKeys "{ENTER}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment