Last active
February 10, 2018 08:35
-
-
Save longtth/6db084611ef40390ff58b8698145b207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NETSH interface set interface name="Ethernet" admin=ENABLE | |
NETSH interface set interface name="Wi-Fi" admin=DISABLED | |
REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NETSH interface set interface name="Wi-Fi" admin=ENABLE | |
NETSH interface set interface name="Ethernet" admin=DISABLED | |
REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f | |
REM if you want to use another proxy server: | |
REM reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" ^ | |
REM /v ProxyServer /t REG_SZ /d proxyserveraddress:proxyport /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM check if Wifi is enabled then disable wifi, enable ethernet, | |
REM else enable wifi, disable ethernet. | |
REM there is a command for get current status but how to check using code? [netsh interface show interface] | |
REM C:\Users\longnx>netsh interface show interface | |
REM | |
REM Admin State State Type Interface Name | |
REM ------------------------------------------------------------------------- | |
REM Disabled Disconnected Dedicated VirtualBox Host-Only Network | |
REM Enabled Connected Dedicated Local Area Connection* 13 | |
REM Enabled Connected Dedicated Wi-Fi | |
REM Disabled Disconnected Dedicated Ethernet | |
REM | |
REM | |
REM C:\Users\longnx> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment