windows - DNS更改.bat脚本适用于Win7但不适用于Win10
问题描述
所以,这是代码:
:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 &
:: Windows XP/Vista/7
@ECHO OFF
SETLOCAL EnableDelayedExpansion
netsh interface ipv4 set dns "Local Area Connection" static 8.8.8.8
netsh interface ipv4 add dns "Local Area Connection" 8.8.4.4 index=2
:EOF
当我在 Windows 7(我的台式机)上运行它时它工作正常,但它在 Windows 10(我的笔记本电脑)上不起作用。知道为什么吗?
解决方案
推荐阅读
- angular - useFactory Provider 用于模块中的分离服务实例
- selenium-webdriver - 如何在 CSS Selector 字符串中使用 Method 的参数?
- ios - UITableView Cell ( Autoscroll ) 内的多个 CollectionView 问题
- python - 如何修复 pip 未被识别为命令?
- sql - 获得每所学校男女学生的最高 GPA 分数
- sql-server - TRY CAST 可用并且 TRY CONVERT 不在 SQL Server 2012 中?
- php - 字符串替换以替换空格并保持破折号
- c# - Visual Studio 挂起一次运行 300 多个单元测试
- r - 有没有办法在 Excel 中嵌入 R 代码?
- c - 我无法复制 png 图像