Jump to content

Start DSL connection from Network Connections


Guest autocoder
 Share

Recommended Posts

Guest autocoder

I am a retired mainframe programmer trying to learn AutoIT.

I am trying to activate my DSL connection from Control Panel\Network Connections as follows:

Run("control panel\network connections\BELLSOUTH DSL.lnk")

or

$shortcut = FileGetShortCut ("C:\Documents and Settings\Wade\Desktop\BELLSOUTH DSL.LNK")

Run($shortcut[0],$shortcut[1])

Neither of the above works. $shortcut is null

Can anyone help me.

Link to comment
Share on other sites

This is an interesting question:

0) Just curious: Isn't DSL an "always-on" connection?

1) LNK files can typically be run by using Run(@ComSpec & "/c " & $shortcutGoesHere, "", @SW_HIDE) BUT it appears that network connection shortcuts don't work with this ...

2) Dial-up connections can be launched with "rasdial.exe"--search the forum for more info--but I don't see any equivalent for DSL/LAN connections....

Ugly workaround tested on Windows XP Pro (English):

$path = @DesktopDir & '\BELLSOUTH DSL.lnk'
Send("#r");simulate Win+R keypress
WinWait("Run");wait for the Run dialog to appear
ControlSetText("Run","","Edit1","""" & $path & """")
ControlClick("Run","","OK")
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

This is an interesting question:

0)  Just curious:  Isn't DSL an "always-on" connection?

Not always. It depends on the type of the DSL equipment you have. If you have a DSL modem you cannot keep you DSL connection always-on, unless you leave your computer open.

If instead of having a cheap USB DSL modem, you have a DSL router you can do the job. It keeps the connection alive and even if the line disconnects, it tries to bring it back (if wanted). In any case you can setup everything concerning your connection and you don't have to use a computer as a gateway..

1)  LNK files can typically be run by using Run(@ComSpec &  "/c " & $shortcutGoesHere, "", @SW_HIDE) BUT it appears that network connection shortcuts don't work with this ...

2)  Dial-up connections can be launched with "rasdial.exe"--search the forum for more info--but I don't see any equivalent for DSL/LAN connections....

I think that the case is the same. If you don't use a router as I said, you have to setup a VPN connection that sends to the DSL USB modem almost the same information as a normal dial-up connection (username/password and IP instead of the phone number). So maybe your workaround is correct here..
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...