无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 3046|回复: 14

[求助] 怎么使用批处理删除多余的界面语言和输入法?

[复制链接]
发表于 2018-12-10 16:20:59 | 显示全部楼层 |阅读模式
本帖最后由 iruanmi 于 2018-12-10 16:22 编辑

使用 NTLite 1.5 破解版精简 LTSB 2016,可以删除多余的民族语言(其实就是界面语言)和键盘布局(其实就是输入法)

我想的是:挂载映像文件(install.wim)之后,在离线状态下,不借助类似于 NTLite 的工具,而是使用批处理来进行同样的操作、达到同样的效果。

有哪位大神能写一个相关的批处理(.bat 文件,可能还需要一个 .reg 文件)啊?
 楼主| 发表于 2018-12-10 16:30:45 | 显示全部楼层
我希望的效果是:

界面语言只保留 de-de、fr-fr、en-us、ja-jp、ko-kr、ru-ru、zh-cn、zh-tw,其它的全部删除。

输入法只保留 英文-美式键盘微软五笔,其它的全部删除。

点评

通用的话建议保留微软拼音,虽然我也是用微软五笔的。这个精简的批处理我有,比起以上的回复感觉更容易理解一点,现在这台本本没有资料,迟点再回复你。  发表于 2018-12-12 09:46
回复

使用道具 举报

发表于 2018-12-10 16:40:10 | 显示全部楼层
@echo off
echo.&ECHO 仅用于WinPE环境中运行
echo.
ECHO 输入系统所在盘符,回车执行。
echo.
SET /P PAR=分区盘符(C、D、E、F、G、H、I...):
echo.

for %%m in (af-ZA am-ET ar-SA as-IN az-Latn-AZ be-BY bg-BG bn-BD bn-IN bs-Latn-BA ca-ES ca-ES-valencia chr-CHER-US cs-CZ cy-GB da-DK de-DE el-GR eu-ES en-GB en-US es-ES es-MX et-EE fi-FI fa-IR
fil-PH fr-CA fr-FR ga-IE gd-GB gl-ES gu-IN ha-Latn-NG he-IL hi-IN hr-HR hu-HU hy-AM id-ID ig-NG it-IT is-IS ja-JP ka-GE kk-KZ ko-KR km-KH kn-IN kok-IN ku-Arab-IQ ky-KG lb-LU lo-LA lt-LT lv-LV
mi-NZ mk-MK ml-IN mn-MN mr-IN ms-MY mt-MT nb-NO ne-NP nn-NO nso-ZA nl-NL or-IN pa-Arab-PK pa-IN pl-PL pt-BR pt-PT prs-AF quc-Latn-GT quz-PE qps-ploc ro-RO ru-RU rw-RW sd-Arab-PK si-LK sq-AL sk-SK
sl-SI sr-Cyrl-BA sr-Cyrl-RS sr-Latn-CS sr-Latn-RS sv-SE sw-KE ta-IN te-IN tg-Cyrl-TJ ti-ET tk-TM tn-ZA tt-RU th-TH tr-TR ug-CN ur-PK uk-UA uz-Latn-UZ vi-VN wo-SN xh-ZA yo-NG zh-HK zh-TW zu-ZA) do (
     rd /q /s %PAR%:\Windows\System32\%%m>nul 2>nul
     rd /q /s %PAR%:\Windows\SysWOW64\%%m>nul 2>nul
     rd /q /s %PAR%:\Windows\Boot\EFI\%%m>nul 2>nul
     rd /q /s %PAR%:\Windows\Boot\PCAT\%%m>nul 2>nul
     rd /q /s %PAR%:\Boot\%%m>nul 2>nul
)

for %%l in (cht_boot.ttf jpn_boot.ttf kor_boot.ttf malgunn_boot.ttf malgun_boot.ttf meiryon_boot.ttf meiryo_boot.ttf msjhn_boot.ttf msjh_boot.ttf msyhn_boot.ttf msyh_boot.ttf segmono_boot.ttf segoen_slboot.ttf segoe_slboot.ttf) do (
     del /q /f %PAR%:\Windows\Boot\Fonts\%%l 2>nul
     del /q /f %PAR%:\Boot\Fonts\%%l 2>nul
)
attrib -r -s -a -h %PAR%:\Boot\BCD.LOG>nul 2>nul
attrib -r -s -a -h %PAR%:\Boot\BCD.LOG1>nul 2>nul
attrib -r -s -a -h %PAR%:\Boot\BCD.LOG2>nul 2>nul
del /q /f %PAR%:\Boot\BCD.LOG 2>nul
del /q /f %PAR%:\Boot\BCD.LOG1 2>nul
del /q /f %PAR%:\Boot\BCD.LOG2 2>nul

点评

多谢朋友的回复 …… 我有三个疑问: 一、假设 install.wim 文件的挂载目录是 F:\11\ab …… 不是根目录,是根目录下的二级文件夹。你贴的批处理的前面,清楚的写明 PAR=分区盘符(根目录)…… 这样一来,不是根  详情 回复 发表于 2018-12-10 18:39
回复

使用道具 举报

发表于 2018-12-10 17:24:13 | 显示全部楼层
只有VISTA和WIN7可以通过注册表修改,之后的系统不行。
回复

使用道具 举报

 楼主| 发表于 2018-12-10 18:39:34 | 显示全部楼层
jiguo 发表于 2018-12-10 16:40
@echo off
echo.&ECHO 仅用于WinPE环境中运行
echo.

多谢朋友的回复 …… 我有三个疑问:

一、假设 install.wim 文件的挂载目录是 F:\11\ab …… 不是根目录,是根目录下的二级文件夹。你贴的批处理的前面,清楚的写明 PAR=分区盘符(根目录)…… 这样一来,不是根目录的 F:\11\ab 能够直接替换吗?

二、如果通过 NSudoC 以最高权限(TrustedInstaller)来运行此批处理,对相关文件、文件夹进行提权的操作是不是可以省略了?

三、你贴的批处理,我感觉只是删除了多余的界面语言 …… 多余的输入法(保留美式键盘和微软五笔)又该怎么删除呢?

点评

对于问题一,我这个是为了通用一点才这么设置的,你要的功能很简单:去掉"%PAR%:"后面的“:”,之后在运行的时候输入完整的“F:\11\ab”就可以了,或者去掉批处理上半截,直接把"%PAR%:"替换成“F:\11\ab”运行即可  详情 回复 发表于 2018-12-12 08:25
回复

使用道具 举报

 楼主| 发表于 2018-12-10 19:42:58 | 显示全部楼层
frg521 发表于 2018-12-10 19:12
删除楼上的所有冒号即可
顺便删除你要保留的语言名字,字体那里全删除,不需要精简

但是,多余的键盘布局(输入法)我也不想要啊 …… 除了 英文-美式键盘微软五笔 之外,其它的输入法我全都不要!

这个批处理能把多余的输入法也删除吗?
回复

使用道具 举报

发表于 2018-12-10 20:38:14 | 显示全部楼层
建议禁用功能,不要删除!

         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-IME-ja
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-IME-ko
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ar-sa
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-bg-bg
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-bn-bd
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-bn-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ca-es
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-cs-cz
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-da-dk
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-de-de
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-el-gr
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-es-es
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-et-ee
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-eu-es
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-fi-fi
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-fr-fr
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-gl-es
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-gu-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-he-il
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-hi-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-hr-hr
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-hu-hu
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-id-id
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-is-is
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-it-it
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ja-jp
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-kn-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ko-kr
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-lt-lt
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-lv-lv
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ml-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-mr-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ms-bn
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ms-my
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-nb-no
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-nl-nl
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-nn-no
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-pa-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-pl-pl
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-pt-br
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-pt-pt
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ro-ro
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ru-ru
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-sk-sk
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-sl-si
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-sr-cyrl-rs
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-sr-latn-rs
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-sv-se
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ta-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-te-in
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-th-th
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-tr-tr
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-uk-ua
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-ur-pk
         %windir%\system32\dism /Image:!LPartSource!:\mount /Disable-Feature /Scratchdir:!LPartSource!:\tmp_Imagex   /FeatureName:Microsoft-Windows-LanguageComponents-vi-vn
回复

使用道具 举报

发表于 2018-12-12 08:25:29 | 显示全部楼层
本帖最后由 jiguo 于 2018-12-12 08:27 编辑
iruanmi 发表于 2018-12-10 18:39
多谢朋友的回复 …… 我有三个疑问:

一、假设 install.wim 文件的挂载目录是 F:\11\ab …… 不是根目 ...



对于问题一,我这个是为了通用一点才这么设置的,你要的功能很简单:去掉"%PAR%:"后面的“:”,之后在运行的时候输入完整的“F:\11\ab”就可以了,或者去掉批处理上半截,直接把"%PAR%:"替换成“F:\11\ab”运行即可;
2、在pe下可以直接运行,在系统下提权应该可以,没有直接试,一般都是在pe下使用的;
3、这个多余的输入法不光要去目录和文件还要去注册表,涉及到的比较多。通常不适合直接用批处理,用Dism++或NTLite等工具去组件比较合适。

以上回复希望对你有用……

点评

删除多余的输入法,能把相关的文件和注册表都删干净,当然是最好的 …… 请问: 一、九楼的坛友贴出的 DISM命令,能不能达到这样的效果? 二、命令里有一段是 /Image:!LPartSource!:\mount …… 红色部分是啥  详情 回复 发表于 2018-12-12 12:28
回复

使用道具 举报

 楼主| 发表于 2018-12-12 12:28:21 | 显示全部楼层
jiguo 发表于 2018-12-12 08:25
对于问题一,我这个是为了通用一点才这么设置的,你要的功能很简单:去掉"%PAR%:"后面的“:”,之后 ...

删除多余的输入法,能把相关的文件和注册表都删干净,当然是最好的 …… 请问:

一、九楼的坛友贴出的 DISM命令,能不能达到这样的效果?

二、命令里有一段是 /Image:!LPartSource!:\mount …… 红色部分是啥意思?

点评

系统所在路径  详情 回复 发表于 2018-12-12 13:10
回复

使用道具 举报

发表于 2018-12-12 13:10:29 | 显示全部楼层
iruanmi 发表于 2018-12-12 12:28
删除多余的输入法,能把相关的文件和注册表都删干净,当然是最好的 …… 请问:

一、九楼的坛友贴出的 ...

系统所在路径

点评

/Image 是映像文件(install.wim)挂载目录,/Scratchdir 是临时文件存放目录,根据实际情况自行修改 ………… 你说的是这个意思吧?  详情 回复 发表于 2018-12-12 14:03
回复

使用道具 举报

 楼主| 发表于 2018-12-12 14:03:09 | 显示全部楼层

/Image 是映像文件(install.wim)挂载目录,/Scratchdir 是临时文件存放目录,根据实际情况自行修改 ………… 你说的是这个意思吧?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-19 09:21

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表