From: Banana Date: Sun, 8 Nov 2020 18:10:57 +0000 (+0100) Subject: adding a windows toggle network bat file X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=8df65f20293d8d39367c003e9b65736624e9345f;p=klimbim.git adding a windows toggle network bat file --- 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