Created
January 21, 2014 19:15
-
-
Save kevinberny/8546363 to your computer and use it in GitHub Desktop.
Disconnect Cisco Anyconnect VPN client and disable wireless (used when Ethernet is enabled at the office
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
do shell script "networksetup -setairportpower en0 off" | |
tell application "Cisco AnyConnect Secure Mobility Client" | |
activate | |
end tell | |
repeat until application "Cisco AnyConnect Secure Mobility Client" is running | |
delay 1 | |
end repeat | |
tell application "System Events" | |
repeat until (window 1 of process "Cisco AnyConnect Secure Mobility Client" exists) | |
delay 1 | |
end repeat | |
click button "Disconnect" of window 1 of application process "Cisco AnyConnect Secure Mobility Client" | |
end tell | |
tell application "Cisco AnyConnect Secure Mobility Client" | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment