Frictional Games Forum (read-only)
Internet On or Off (.bat file) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Frictional Games (https://www.frictionalgames.com/forum/forum-3.html)
+--- Forum: Off-Topic (https://www.frictionalgames.com/forum/forum-16.html)
+--- Thread: Internet On or Off (.bat file) (/thread-18925.html)



Internet On or Off (.bat file) - darkely - 10-25-2012

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]


RE: Internet On or Off (.bat file) - Statyk - 10-25-2012

Turn off internet? What kind of terrorist are you? D:


RE: Internet On or Off (.bat file) - Robby - 10-25-2012

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


RE: Internet On or Off (.bat file) - vsrawat - 11-14-2012

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


RE: Internet On or Off (.bat file) - eliasfrost - 11-14-2012

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


RE: Internet On or Off (.bat file) - xxxxxxxxxxxxxxxx - 11-15-2012

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!


RE: Internet On or Off (.bat file) - The chaser - 11-15-2012

(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".


RE: Internet On or Off (.bat file) - TheBlastPassage - 11-15-2012

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