From 8df65f20293d8d39367c003e9b65736624e9345f Mon Sep 17 00:00:00 2001 From: Banana Date: Sun, 8 Nov 2020 19:10:57 +0100 Subject: [PATCH] adding a windows toggle network bat file --- windows/toggle-network-connection.bat | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 windows/toggle-network-connection.bat diff --git a/windows/toggle-network-connection.bat b/windows/toggle-network-connection.bat new file mode 100644 index 0000000..636fbbd --- /dev/null +++ b/windows/toggle-network-connection.bat @@ -0,0 +1,25 @@ +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE +:: You should have received a copy of the +:: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 +:: along with this program. If not, see http://www.sun.com/cddl/cddl.html +:: +:: 2020 http://91.132.146.200:3000/Banana/klimbim +:: +:: Use this script for windows to toggle your network connection +:: Replace Ethernet with the name of your network connection and execute +:: this with admin priviliges + +@echo off +cls +ping google.com +IF ERRORLEVEL 1 goto ACTIVATE +IF ERRORLEVEL 0 goto DEACTIVATE + +:ACTIVATE +netsh interface set interface "Ethernet" admin=enable +exit + +:DEACTIVATE +netsh interface set interface "Ethernet" admin=disable +exit -- 2.39.5