当前位置:网站首页>win12 修改dns脚本
win12 修改dns脚本
2022-08-10 05:31:00 【开发老张】
当有 vpn 的时候,连接 vpn 后需要将 dns 地址改为 vpn 连接上的网络环境中的一台 named 服务器上
在 D:/soft 下新建一个 chdns.bat 批处理文件,内容:
# 设置 dns 地址为 10.1.2.3
netsh interface ip set dns name="以太网 2" source=static addr=10.1.2.3 register=primary
# 将原来本地的 dns 地址也添加上
netsh interface ip add dns name="以太网 2" addr=10.2.3.1
pause
因为 .bat 文件无法直接放到 win12 的开始菜单中,因此需要用 exe 文件做一个过度
在 C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs 下鼠标右键 - 新建 - 快捷方式,目标:C:\Windows\System32\cmd.exe /c D:\soft\chdns.bat
此时在开始菜单中点击 chdos.bat 即可设置好 DNS 信息;
边栏推荐
- Pony语言学习(一):环境配置(续)
- pytorch框架学习(4)torchvision模块&训练一个简单的自己的CNN (一)
- Become a language that hackers have to learn. Do you think it's okay after reading it?
- 论文精度 —— 2017 ACM《Globally and Locally Consistent Image Completion》
- 【论文笔记1】小样本分类
- matlab中的常用的类型转换
- 25张炫酷交互图表,一文入门Plotly
- 基于Qiskit——《量子计算编程实战》读书笔记(四)
- pytorch框架学习(3)torch.nn.functional模块和nn.Module模块
- MySql's json_extract function processes json fields
猜你喜欢
scikit-learn机器学习 读书笔记(一)
Advanced Feature Selection Techniques in Linear Models - Based on R
pytest测试框架
AVL tree insertion--rotation notes
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
Joomla vulnerability reproduced
基于Qiskit——《量子计算编程实战》读书笔记(五)
.las转.txt 再转.pcd,编译运行中出现的错误
Pony语言学习(六):Struct, Type Alias, Type Expressions
网安超基础一周目
随机推荐
三维点云分割
FPGA engineer interview questions collection 1~10
Jenkins 如何玩转接口自动化测试?
自适应空间特征融合( adaptively spatial feature fusion)一种基于数据驱动的金字塔特征融合策略
一文带你搞懂OAuth2.0
canvas canvas drawing clock
基于Qiskit——《量子计算编程实战》读书笔记(四)
Depth of carding: prevent model fitting method
Read the excerpt notes made by dozens of lightweight target detection papers for literacy
An article will help you understand what is idempotency?How to solve the idempotency problem?
MySql's json_extract function processes json fields
k-近邻实现手写数字识别
看了几十篇轻量化目标检测论文扫盲做的摘抄笔记
2021-07-09
AVL tree insertion--rotation notes
Kubernetes:(十六)Ingress的概念和原理
基于Qiskit——《量子计算编程实战》读书笔记(七)
【YOLOv5训练错误】权重文件出错?
训练集Loss收敛,但是测试集Loss震荡的厉害?
Become a language that hackers have to learn. Do you think it's okay after reading it?