Jump to content
Sign in to follow this  
McGod

INetCon.au3

Recommended Posts

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

InetCon.au3

Hopefully it will help people.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...