Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Internet On or Off (.bat file)
darkely Offline
Posting Freak

Posts: 984
Threads: 87
Joined: Dec 2011
Reputation: 10
#1
Internet On or Off (.bat file)

Code Wrote:@echo off
netsh interface show interface | find "Connected" > nul
if errorlevel 1 goto #
netsh interface set interface "Local Area Connection" disabled
goto end
:#
netsh interface set interface "Local Area Connection" enabled
:end
Just a neat code to turn internet on or off.

To make it...

Open Notepad (or whatever text editor you choose)
Copy/Paste the code
Save it as a .bat file (how to)

[Image: 2ztf5uq.png]

10-25-2012, 05:30 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Internet On or Off (.bat file)

Turn off internet? What kind of terrorist are you? D:
(This post was last modified: 10-25-2012, 06:07 PM by Statyk.)
10-25-2012, 06:07 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#3
RE: Internet On or Off (.bat file)

A neat way to trick friends. If only you'd never know this got executed...

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-25-2012, 08:57 PM
Website Find
vsrawat Offline
Junior Member

Posts: 1
Threads: 0
Joined: Nov 2012
Reputation: 0
#4
RE: Internet On or Off (.bat file)

not working in my case.

I analyzed and found that "netsh interface show interface " is throwing a blank list just with headers, so it is not able to "find" my connection.

my connection name is reliance, that is reliance broadband+ on w7-64 bit.

What to do.

Thanks.
--
Rawat
11-14-2012, 10:35 AM
Find
eliasfrost Offline
Posting Freak

Posts: 1,769
Threads: 34
Joined: Mar 2007
Reputation: 39
#5
RE: Internet On or Off (.bat file)

Or you could just disable your connection? Isn't that the same?

[Image: indiedb_88x31.png]
11-14-2012, 12:56 PM
Find
xxxxxxxxxxxxxxxx Away
Posting Freak

Posts: 935
Threads: 0
Joined: Jun 2012
Reputation: 54
#6
RE: Internet On or Off (.bat file)

Or you could just...pull the cable. Big Grin
Well unless its wireless I guess. But anyway, why would you even want to disable your internet?! That's madness!
11-15-2012, 04:57 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#7
RE: Internet On or Off (.bat file)

(11-15-2012, 04:57 PM)Hirnwirbel Wrote: Or you could just...pull the cable. Big Grin
Well unless its wireless I guess. But anyway, why would you even want to disable your internet?! That's madness!
It's the trolling art. While in a friend's home, if he/she is going for a drink or something and it's computer is on, you go there and... "mode troll activated".

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-15-2012, 05:24 PM
Find
TheBlastPassage Offline
Senior Member

Posts: 338
Threads: 18
Joined: Oct 2012
Reputation: 11
#8
RE: Internet On or Off (.bat file)

This could be a good troll. You could tell your friends that it's a cool game you coded and if you're tricking somebody who knows Batch and will inspect the file before running it, there are several programs that convert .bat to .exe

11-15-2012, 07:59 PM
Website Find




Users browsing this thread: 1 Guest(s)