From 55cc1a47ac9b50684eda6e0042a7f40574e26bd6 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 22 Mar 2024 20:05:53 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E4=BD=BF=E7=94=A8=20437=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.bat | 4 +++- reinstall.sh | 4 ++-- windows-del-gpo.bat | 2 +- windows-resize.bat | 2 +- windows-set-netconf.bat | 2 +- windows-setup.bat | 6 ++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/reinstall.bat b/reinstall.bat index c35a1f1..392ed37 100644 --- a/reinstall.bat +++ b/reinstall.bat @@ -1,10 +1,12 @@ @echo off -mode con cp select=65001 >nul +mode con cp select=437 >nul setlocal EnableDelayedExpansion set confhome=https://raw.githubusercontent.com/bin456789/reinstall/main set github_proxy=raw.gitmirror.com +rem 65001 代码页会乱码 + rem 不要用 :: 注释 rem 否则可能会出现 系统找不到指定的驱动器 diff --git a/reinstall.sh b/reinstall.sh index 8260be5..de4f283 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1645,8 +1645,8 @@ if is_in_windows; then fi # 更改 windows 命令输出语言为英文 - # chcp.com 65001 # 会清屏 - mode.com con cp select=65001 >/dev/null + # chcp 会清屏 + mode.com con cp select=437 >/dev/null fi # 检查 root diff --git a/windows-del-gpo.bat b/windows-del-gpo.bat index 6e543a8..031efe5 100644 --- a/windows-del-gpo.bat +++ b/windows-del-gpo.bat @@ -1,5 +1,5 @@ @echo off -mode con cp select=65001 >nul +mode con cp select=437 >nul setlocal enabledelayedexpansion set "files[1]=%windir%\System32\GroupPolicy\gpt.ini" diff --git a/windows-resize.bat b/windows-resize.bat index 8c66ce5..2ed4eed 100644 --- a/windows-resize.bat +++ b/windows-resize.bat @@ -1,5 +1,5 @@ @echo off -mode con cp select=65001 >nul +mode con cp select=437 >nul set C=%SystemDrive:~0,1% for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\"') do (echo select vol %%a & echo delete partition) | diskpart diff --git a/windows-set-netconf.bat b/windows-set-netconf.bat index 5342856..a50a584 100644 --- a/windows-set-netconf.bat +++ b/windows-set-netconf.bat @@ -11,7 +11,7 @@ rem set ipv6_dns1=::1 rem set ipv6_dns2=::2 @echo off -mode con cp select=65001 >nul +mode con cp select=437 >nul setlocal EnableDelayedExpansion rem 禁用 IPv6 地址标识符的随机化,防止 IPv6 和后台面板不一致 diff --git a/windows-setup.bat b/windows-setup.bat index cba0aa8..175b34e 100644 --- a/windows-setup.bat +++ b/windows-setup.bat @@ -1,11 +1,9 @@ @echo off mode con cp select=437 >nul -rem 正常来说应该用 46001 代码页 -rem 但 win7 find 命令在 46001 代码页下有问题,仅限 win 7 -rem echo a | find "a" +rem win7 find 命令在 65001 代码页下有问题,仅限 win 7 rem findstr 就正常,但安装程序又没有 findstr -rem 只好用 437 代码页,好像也没副作用 +rem echo a | find "a" rem 使用高性能模式 rem https://learn.microsoft.com/windows-hardware/manufacture/desktop/capture-and-apply-windows-using-a-single-wim