Created
March 16, 2023 13:16
-
-
Save celeron633/69b9a5616ca0f50d83d67e5aa05eb55d to your computer and use it in GitHub Desktop.
windows cmd切换网络配置
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 | |
@echo off&(cd/d "%~dp0")&(cacls "%SystemDrive%\System Volume Information" >nul 2>&1)||(color 4f&echo 请右键“以管理员身份运行”&echo.&pause&exit /b) | |
netsh interface ip set address "以太网" static 192.168.31.100 255.255.255.0 192.168.31.3 1 | |
netsh interface ip set dns "以太网" static 8.8.8.8 | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment