Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

INetCon.au3


  • Please log in to reply
4 replies to this topic

#1 McGod

McGod

    Formerly Chip

  • Active Members
  • PipPipPipPipPipPip
  • 589 posts

Posted 12 July 2007 - 02:27 PM

I was hunting for awhile and finally came across a cmd that would disconnect/connect internet.
It only works for broadband although the command has dialup access aswell(Cant test no dialup)

Posted Image

It has 4 Functions:

_INetConnect($Service, $Username, $Password)
Will connect the service

Return Values:
1=Connected
0=Bad User/Pass
-1=Other error(Have to research em)

_INetDisconnect($Service)
Will disconnect the service

Return Values:
1=Disconnected
0=Errored

_INetStatus($Service)
Will check the status of a service

Return Values:
1=Connected
0=Disconnected

_INetReconnect($Service, $Username, $Password)
Will disconnect and reconnect the internet.

Return Values:
1=Reconnected
0=Bad user/pass

Example Script:
#include <INetCon.au3> If _INetStatus("Sympatico") = 0 Then _INetConnect("Sympatico", "b1xxxxx", "xxxxx") Else _INetDisconnect("Sympatico") EndIf


Attached File  InetCon.au3   1.69KB   1010 downloads

Hopefully it will help people.







#2 Obi-w00t

Obi-w00t

    Wayfarer

  • Active Members
  • Pip
  • 64 posts

Posted 12 July 2007 - 03:55 PM

Thanks for sharing, nice script.

#3 James

James

    Universalist

  • MVPs
  • 10,209 posts

Posted 12 July 2007 - 04:04 PM

Haha nice :lmao:

Always useful for me. I have many internet reconnectors :whistle:

#4 goldenix

goldenix

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 738 posts

Posted 24 May 2008 - 02:45 PM

Many thanx. Works like a charm with my Dial up connection.

To get your Dial up connection name (in this example its called Sympatico) do this:

Right click on your dial up desktop shortcut -> Properties -> Find target

#5 t0bias

t0bias

    Seeker

  • Active Members
  • 7 posts

Posted 29 May 2008 - 08:57 PM

hey, is it possible to expand the functionality to pass actual dialup numbers instead of only user/pass?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users