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