13A538g: Connecting to a VPN via AppleScript is not working
Originator: | clrams | ||
Number: | rdar://14697626 | Date Originated: | 09-Aug-2013 12:18 PM |
Status: | Open | Resolved: | |
Product: | OS X | Product Version: | OS X 10.9 13A538g |
Classification: | Serious Bug | Reproducible: | Always |
Summary: Connecting to a VPN via AppleScript is not working and results in an error instead of a connection Steps to Reproduce: Run the applescript code below Expected Results: A connection to the VPN would be established Actual Results: The following is output: tell application "System Events" get service "HomeVPN" of current location of network preferences --> service id "E2C9BDF9-3BAA-4AC9-9229-2055E780E0B9" of network preferences get connected of current configuration of service id "E2C9BDF9-3BAA-4AC9-9229-2055E780E0B9" of network preferences --> false connect service id "E2C9BDF9-3BAA-4AC9-9229-2055E780E0B9" of network preferences --> missing value end tell Result: missing value Regression: This hasn't worked on Mavericks, it worked fine in Mountain Lion Notes: Apple script code used: set q to "HomeVPN" tell application "System Events" tell current location of network preferences set VPNservice to service q -- name of the VPN service set isConnected to connected of current configuration of VPNservice if not isConnected then connect VPNservice end if end tell end tell
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!