altsheepy 0 Posted May 31, 2011 Hi , I need to set up a script to automatically run 2 vpn connections. The first one uses an exe file and thus it was easy to script, but the 2nd is a connection that is not an exe file, under All Control Panel Items\Network Connections\<connection name> I have no idea how i can make my script open this and click on the connect button. Is there anyway i can do this? Thanks for any help! Share this post Link to post Share on other sites
MrMitchell 16 Posted June 2, 2011 Refer to post.In the first function ( Func _NicControl($oLanConnection, $bEnable = 1, $bFullName = 1) ), change:$strEnableVerb = "En&able"$strDisableVerb = "Disa&ble"To:$strEnableVerb = "C&onnect"$strDisableVerb = "Disc&onnect"Enable/Disable are used for Network Connections while Connect and Disconnect are used for VPN Connections. I thought there would be a WMI solution for this but I couldn't find anything. So far this is it but it seems to work fine for me! Share this post Link to post Share on other sites