本人自用,只针对单一网卡- @echo off
- Title "网络连接方式设置"
- mode con: cols=50 lines=20
- echo.
- echo “ 0 ” 为公用网络
- echo.
- echo “ 1 ” 为专用网络
- echo.
- set /p a=(请输入:)
- echo.
- set "netlist=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles"
- for /f "tokens=2 delims={" %%x in ('reg query "%netlist%"') do (reg add "%netlist%\{%%x" /v "Category" /t REG_DWORD /d %a% /f)
- timeout /t 3
复制代码
|