Created
June 24, 2019 09:45
-
-
Save lxfly2000/9c4d716ebd7d78b05b4fa0382d73f418 to your computer and use it in GitHub Desktop.
Configure DNS by using cmdline.
This file contains hidden or 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
@echo off | |
netsh interface ipv6 set dnsservers WLAN dhcp | |
if %errorlevel%==0 goto:eof | |
echo 这个操作需要管理员权限…… | |
mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~0 %*","%cd%","runas",1)(close) |
This file contains hidden or 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
@echo off | |
netsh interface ipv6 set dnsservers WLAN static 2001:470:20::2 primary | |
netsh interface ipv6 add dnsservers WLAN 2001:470:0:9d::2 | |
if %errorlevel%==0 goto:eof | |
echo 这个操作需要管理员权限…… | |
mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~0 %*","%cd%","runas",1)(close) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment