From e3fe839329a91f48ba2af03a90eda3c86b7f33d9 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 22 Mar 2024 00:50:46 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=B0=2065001=20=E4=BB=A3=E7=A0=81=E9=A1=B5?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=AE=89=E8=A3=85=20win7=20=E5=8D=A1?= =?UTF-8?q?=E5=9C=A8=20diskpart=20=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- windows-set-netconf.bat | 4 ++-- windows-setup.bat | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/windows-set-netconf.bat b/windows-set-netconf.bat index 3b8bf42..5342856 100644 --- a/windows-set-netconf.bat +++ b/windows-set-netconf.bat @@ -30,7 +30,7 @@ if defined mac_addr ( rem 配置静态 IPv4 DNS 服务器 for %%i in (1, 2) do ( if defined ipv4_dns%%i ( - netsh interface ipv4 add | find "dnsservers" + netsh interface ipv4 add | findstr "dnsservers" if ErrorLevel 1 ( rem vista netsh interface ipv4 add dnsserver !id! !ipv4_dns%%i! %%i @@ -50,7 +50,7 @@ if defined mac_addr ( rem 配置 IPv6 DNS 服务器 for %%i in (1, 2) do ( if defined ipv6_dns%%i ( - netsh interface ipv6 add | find "dnsservers" + netsh interface ipv6 add | findstr "dnsservers" if ErrorLevel 1 ( rem vista netsh interface ipv6 add dnsserver !id! !ipv6_dns%%i! %%i diff --git a/windows-setup.bat b/windows-setup.bat index e43efec..cba0aa8 100644 --- a/windows-setup.bat +++ b/windows-setup.bat @@ -1,5 +1,11 @@ @echo off -mode con cp select=65001 >nul +mode con cp select=437 >nul + +rem 正常来说应该用 46001 代码页 +rem 但 win7 find 命令在 46001 代码页下有问题,仅限 win 7 +rem echo a | find "a" +rem findstr 就正常,但安装程序又没有 findstr +rem 只好用 437 代码页,好像也没副作用 rem 使用高性能模式 rem https://learn.microsoft.com/windows-hardware/manufacture/desktop/capture-and-apply-windows-using-a-single-wim