Jump to content
Sign in to follow this  
Info

I need a command that shut down the internet

Recommended Posts

Info

I searched in help file and didn't find...

So I was wondering if there's a command the shut down the connection to the internet...

I tried:

_RunDos ( "Ip config/ release") and it didn't work...

Share this post


Link to post
Share on other sites
DjDeep00

I searched in help file and didn't find...

So I was wondering if there's a command the shut down the connection to the internet...

I tried:

_RunDos ( "Ip config/ release") and it didn't work...

The following function will totally cut off the internet connection.....thanx to "Wus"

Func NicToggle($Toggle, $sConnectionName = "Local Area Connection", $sNetworkFolder = "Network Connections")
    
    $ssfCONTROLS = 3
    $sEnableVerb = "En&able"
    $sDisableVerb = "Disa&ble"
    $shellApp = ObjCreate("shell.application")
    $oControlPanel = $shellApp.Namespace ($ssfCONTROLS)
    $oNetConnections = "nothing"
    
    For $folderitem In $oControlPanel.items
        If $folderitem.name = $sNetworkFolder Then
            $oNetConnections = $folderitem.getfolder
            ExitLoop
        EndIf
    Next
    If $oNetConnections = "nothing" Then
        MsgBox(48, "Error", "Couldn't find " & $sNetworkFolder & " folder")
        Exit
    EndIf
    
    $oLanConnection = "nothing"
    For $folderitem In $oNetConnections.items
        If StringLower($folderitem.name) = StringLower($sConnectionName) Then
            $oLanConnection = $folderitem
            ExitLoop
        EndIf
    Next
    If $oLanConnection = "nothing" Then
        MsgBox(48, "Error", "Couldn't find '" & $sConnectionName & "' item")
        Exit
    EndIf
    
    $bEnabled = True
    $oEnableVerb = "nothing"
    $oDisableVerb = "nothing"
    $s = "Verbs: " & @CRLF
    For $verb In $oLanConnection.verbs
        $s = $s & @CRLF & $verb.name
        
   ;enables
        If $verb.name = $sEnableVerb And $Toggle = 1 Then
            $oEnableVerb = $verb
            $oEnableVerb.DoIt
            ExitLoop
            
       ;disables
        ElseIf $verb.name = $sDisableVerb And $Toggle = 0 Then
            $oDisableVerb = $verb
            $oDisableVerb.DoIt
            ExitLoop
        Else
            MsgBox(48, "Error", "Tried to disable when already disabled" & @CRLF & "or enable when already enabled")
            Exit
        EndIf
    Next
    Sleep(1000)
EndFunc ;==>NicToggle

Share this post


Link to post
Share on other sites
bluebearr

Check out this page:

Microsoft KB262265

I used netsh to disable a network connection by setting it to an invalid static IP address. I don't have the script handy, though.


BlueBearrOddly enough, this is what I do for fun.

Share this post


Link to post
Share on other sites
Fossil Rock

The "internet" is a global entity consisting of millions of networked devices, shutting "it" down with AutoIT may prove difficult

And, if successful, will make it very problematic for accessing the Autoit forums ..... not a good idea.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites
jaenster

why the fuck you want to shut down the fucking internetzor?


-jaenster

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.