Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版
Posted 陈晓猫
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版相关的知识,希望对你有一定的参考价值。
2011htpcfans 发表于 2012-5-11
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=210269&highlight=win7%2B%BE%AB%BC%F2
2012-5-5 08:45 本人仓促发布了Win7全自动精简批处理_温柔处理版,经过一周改进优化,现发布新版:Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版。
强烈建议,大家先看完说明。
应部分坛友要求,我把本批处理的设计背景、执行效果、适用群体、设计思路、执行流程、和注意事项简要汇报如下,报告写多了,都八股文了。
1、设计背景
进入Vista、Win7 时代以后,系统动不动好几个G,甚至几十个G,我领导一个Sony 11.6 商务本,Vista business版,2007年左右的,太慢,叫我给他装系统,我一看单分区,也没有大型软件,除了电影、照片外,系统已经占了43个G了,它慢我晕啊。一部分机子的确不适合现在的系统了,不装精简的真的不行了,其实装了精简的也好不到哪里去,对于不会用电脑的人来说。另外,SSD盘对现在的系统也不感冒,它的空间性价比可不高啊,1G空间一寸金啊。还有Winsxs这个臭名昭著的文件夹,令全球使用者头疼啊。所以系统精简还是有一定生存空间的。这里又存在另外一个矛盾,现在的系统一精简就容易出问题,微软下的套了,还有好多无良恶意人士,专门搞内置木马的精简版,肉鸡逮住一个是一个。所以本批理应运而生,完全透明,完全开放,自己定制。
2、功用定位与执行效果
人所共知,现在精简Win7 做的比较好的是vLite和 RT 7 Lite,但是这两个软件运行前提是最好不要直接操作微软原始安装盘,需要一个修复过程(install.wim),即映像(我叫它镜像吧,懒得改口)应用与捕获个依次操作,还要清理文件,清理文件过程也特别恶心,要么新建分区,修复完格式化,要么取得控制权,慢慢处理(目前软件可以搞定,但算法都很垃圾,慢的要命),本批处理就是把这部分以前特别烦杂的工作完全自动化,省去很多人闻微软臭袜子的过程。本批处理定位于Win7、2008R2、Win8精简前期,中期,不与vLite和 RT 7 Lite直接竞争,使用本批处理精简完了可以用它们两个中任一个继续精简。vLite已经老了,RT 7 Lite也不适合Win8,但本批处理几乎通吃当前所有系统版本。温柔处理版大概精简Wim安装文件300M,精简系统安装后文件800M,精简系统安装后空间占用1.8G, 暴力剩女工程测试版,不好说,正紧张测试中。本批处理还可进行系统原始功能组件的快速调整,进行补丁的集成,进行驱动的个性定制。本批处理的精简效果的确不怎么样,但是如果你真正在从事这项工作,你一定会为它折服。本贴放在其他的网站首发可能更合适,但为了为自己一年潜水买单,我特意放在无忧启动论坛发。
3、使用人群
本批理不一定适合所有人群,本批处理适合对电脑有一定研究,对个性化定制有一定要求,会自己摸索系统的DIYer,适合单位批量安装、恢复和系统维护的管理员,适合专门做母盘的准专业人士。说微软设计的东西全都是经典的必须的、原版最稳定而精简后一定不稳定的,请闪开,说电脑不好用还不如电视简单的菜鸟,请闪开。
4、本批处理设计思路与执行流程。
思路:微软原始安装盘到处都是,并且映像组成又特别简单,5选1或4选1,当前前期、中期精简操作中用到的软件、程序、命令基本都包含在系统中,那完全可以通过系统静默调用的方式,加上一定的条件判断、流程控制,让电脑去执行你的暴力吧。
执行流程:
第一阶段:01-10分钟,准备工作。确定好自己要精简、调整和集成处理的系统版准备好必备软件,imagex,最好用最新版的,最好用64位的,最新版是6.2.8250.0,为什么要用64位系统,那个执行速度,真的赛过神8了。这里罗嗦一下,好机子绝对是享受啊,6.2.8250.0的imagex捕获(capture)时好像最多可以同开8个线程,处理8个文件,你说暴力吧。准备阶段可以看到有个D:\lite\mount文件夹暴力删除处理,这是为了防止上次运行本批处理出现意外,快速删除,为本次操作做准备。这里说明一下,for /f %%i in (d:\lite\del_rd.txt) do (if exist %%i (takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))这条命令真的好牛,遍历所有文件夹,每个文件夹,用管理员取得权限(takeown)、提升控制权(icacls)并同时删除(rd),win7 X32 Pro原版系统大约9000文件夹,70000文件,差不多5分钟删除完毕,比那个什么优化大师的右键取得管理员权限不知快多少倍,真不知道他们写的什么代码!为什么执行两次,还要循环,呵呵,都是微软下的套,第一是差不多10层深度的文件夹,难以处理,其二是有几个流氓文件夹,要好几次操作才能搞定。这两点都可以在rd_index.txt中看得一清二楚,你自己控制好rd_index.txt删除时机,或者复制一个全局文件,别删除,最后看一下。这是一点极速,相对市面同类软件,相对前一版本,前面说的“要么新建分区,修复完格式化,要么取得控制权,慢慢处理(目前软件可以搞定,但算法都很垃圾,慢的要命)”,在此迎刃而解,后续的工作还有突破性的。我K27第一阶段正常不到1分钟。
第二阶段:10-80分钟,挂载,调整,集成,卸载。开始和结束命令分别是挂载和卸载,中间分别是单条命令实现家庭高级版以上不常用组件禁用,注释掉的语句分别是英文版集成中文版补丁和中文设置,还有集成不名补丁,无视微软验证集成自己机子的专用驱动。这一阶段我K27(500G,单碟250G)只进行不常用组件禁用刚好10分钟。这一阶段,时间随个人补丁和驱动多少不定,自己掌握。
第三阶段:大约40分钟,应用,掌控,精简,捕获,清理。首先是捕获,然后是高速取得管理权限、提升控制权限,这里又跟第一阶段算法有很大不同。第一阶段,Dir遍历所有文件夹,重定向到rd_Index.txt,然后可以循环,就是后续遍历基础,高速取得管理权限、提升控制权限目的是删除,掌控同时就进行删除,当然后续不会再进行遍历,那个什么优化大师的右键取得管理员权限的代码估计就是这里没优化,取得管理权限命令takeown里有格参数/r,也是遍历,所有文件夹,再重复遍历不慢才怪!到了第二阶段,执行遍历同时不能删除如何是好,再重复遍历,连我家属都不会放过我的。这里卡了我两天进度,最后终于搞定:Dir遍历所有文件夹,重定向到rd_Index.txt,对每个文件夹,先看看他的权限表,icacls %%i >d:\lite\cal.txt,如果在权限表里发现有管理员名字:findstr %2 d:\lite\cal.txt,就是你执行本批处理的第二个参数,说明本文件夹已经被管理员控权,跳出本次循环,如果没发现,执行取得管理权限、提升控制权限,那个||就是个条件判断运算符,前面执行成功,后面不执行。这样一来它的执行效率跟第一阶段中代码相差无几,当然超长文件夹名和流氓文件夹也肯定存在,但不影响后续删减文件,先不管。然后就是删减。往后看,“温柔处理极速修订版与暴力剩女工程测试版分界线”,如果大家执行我这一版批处理只输入原来两个参数,它还是温柔处理版,只不过速度飙升,如果输入了参数,并且输对了参数,它就是暴力剩女工程测试版。
5、暴力剩女工程测试版,慎用,使用注意事项
这一版,现是第一稿,请懂得多提意见,直接执行,不会有什么好结果。当然,一般人可能根本到不了这个层次。期待高手啊!
温柔处理极速修订版,正常执行一次甚至仅仅60分钟,绝对是从来不曾有过这样的感觉啊!
暴力剩女工程测试版,真诚希望高手斧正啊!
所有问题,请大家说清楚版本、现象,我都不放过;任何一条建议,我都喜欢;但任何一条建议,如不在本论坛,我肯定没精力管,我还要上班呢!
@echo 第一阶段,01-05分钟,准备工作。
if exist d:\lite\iso\sources goto okISO
@echo 兄弟,ISO文件提取不对,解压好,按任意键继续。
pause
:okISO
if not "%1%"=="" goto okArguments
@echo 兄弟,没输参数,任意键退出。
pause
goto ESC
:okArguments
if not exist d:\lite\mount goto md
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do (if exist %%i (takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
:rd_Prepare
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
if exist d:\lite\mount goto rd_Prepare
:md
md d:\lite\mount
if exist d:\lite\imagex.exe goto existImagex
echo 兄弟,请复制imagex吧,OK了,再按任意键继续。
pause
:existImagex
del /f /s /q d:\lite\win7_lite.wim
@echo 尊敬的,我要开工了!
pause
@echo 第二阶段,10-80分钟,挂载,调整,集成,卸载。
dism /mount-wim /wimfile:d:\lite\iso\sources\install.wim /index:%1 /mountdir:d:\lite\mount
Dism /Image:d:\lite\mount /Disable-Feature /FeatureName:TabletPCOC /FeatureName:WindowsGadgetPlatform /FeatureName:MediaCenter /FeatureName:FaxServicesClientPackage /FeatureName:Printing-XPSServices-Features /FeatureName:Xps-Foundation-Xps-Viewer /FeatureName:Printing-Foundation-InternetPrinting-Client /FeatureName:Hearts /FeatureName:Solitaire /FeatureName:SpiderSolitaire /FeatureName:FreeCell /FeatureName:Minesweeper /FeatureName:PurblePlace /FeatureName:Chess /FeatureName:Shanghai /FeatureName:InboxGames
dism /image:d:\lite\mount /add-package /packagepath:d:\lite\lp.cab
dism /image:d:\lite\mount /set-uilang:zh-cn
::dism /image:d:\lite\mount /add-package /packagepath:d:\lite\myPackagePath
::Dism /Image:d:\lite\mount /add-driver /driverpath:d:\lite\MyDriver /recurse /forceunsigned
Dism /unmount-wim /mountdir:d:\lite\mount /commit
@echo 第三阶段,大约60分钟,应用,掌控,精简,捕获。
d:\lite\imagex /apply d:\lite\iso\sources\install.wim %1 d:\lite\mount
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((icacls %%i >d:\lite\cal.txt)&((findstr %2 d:\lite\cal.txt)||((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f ))))
del /f /s /q d:\lite\mount\windows\system32\recovery\ winre.wim
del /f /s /q d:\lite\mount\windows\winsxs\*ati*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ati*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*ati*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ati*inf* >d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*ati*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*nv*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*nv*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*nv*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*nv*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*nv*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*flpy*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*flpy*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*flpy*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*flpy* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*flpy* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*wia*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*wia*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*wia*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*wia*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*wia*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*fax*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*fax*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*fax*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*fax* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*fax* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*mdm*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mdm*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*mdm*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mdm*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*mdm*inf* >>d:\lite\del_index.txt
::干掉兄弟打印机驱动,prnbr。
del /f /s /q d:\lite\mount\windows\winsxs\*prnb*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnb*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnb*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnb* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnb* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnc*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnc*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnc*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnc* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnc* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnfx*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnfx*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnfx*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnfx* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnfx* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prng*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prng*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prng*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prng* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prng* >>d:\lite\del_index.txt
::del /f /s /q d:\lite\mount\windows\winsxs\*prne*.*
::del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prne*.*
::dir /ad /b /s d:\lite\mount\windows\winsxs\*prne* >>d:\lite\del_index.txt
::del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prne*.*
::dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prne* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnh*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnh*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnh*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnh* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnh* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prni*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prni*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prni*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prni* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prni* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnk*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnk*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnk*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnk* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnk* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnl*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnl*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnl*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnl* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnl* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnn*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnn*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnn*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnn* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnn* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prno*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prno*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prno*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prno* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prno* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnr*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnr* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnr* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prns*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prns*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prns*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prns* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prns* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnt*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnt*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnt*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnt* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnt* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnx*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnx*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnx*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnx* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnx* >>d:\lite\del_index.txt
温柔处理极速修订版与暴力剩女工程测试版分界线
if not %3==s goto Normal
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mediacenter*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mediacenter* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ehome*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ehome* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gadget*.*
del /f /s /q d:\lite\mount\windows\winsxs\*gadget*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gadget* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*sidebar*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*sidebar* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\help\mui\0804\*chm*.*
del /f /s /q d:\lite\mount\windows\help\mui\0409\*chm*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*chm*.*
del /f /s /q d:\lite\mount\windows\winsxs\*chm*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*chm* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*naturallanguage* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*tablet*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*tablet* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*videosample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\users\*videosample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*musicsample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\users\*musicsample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*performance* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*xps*viewer*.*
del /f /s /q d:\lite\mount\windows\winsxs\*XPSServices*.*
::del /f /s /q d:\lite\mount\windows\winsxs\manifests\*speech*.*
::del /f /s /q d:\lite\mount\windows\winsxs\*speech*.*
::dir /ad /b /s d:\lite\mount\windows\winsxs\*speech* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Backgammon*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Backgammon* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Checkers*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Checkers* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Spades*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Spades* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Shanghai*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Shanghai* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Chess*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Chess* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*PurblePlace*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*PurblePlace* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Minesweeper*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Minesweeper* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*SpiderSolitaire*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*SpiderSolitaire* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*hearts*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*hearts* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Solitaire*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Solitaire* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*imejp*.*
del /f /s /q d:\lite\mount\windows\winsxs\*imekr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*imejp*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*imekr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\ime\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\ime\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*imekr*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\ime\*imekr*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\ime\*imekr*.*>>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*aparaj*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*aparaj*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*aparaj* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Candara*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Candara*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Candara* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*comic*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*comic*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*comic* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*consola*_*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*consola*_*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*consola* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*constan*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*constan*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*constan* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*corbel*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*corbel*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*corbel* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*cordia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*cordia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*cordia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*daunpenh*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*daunpenh*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*daunpenh* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*dokchamp*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*dokchamp*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*dokchamp* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*ebrima*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ebrima*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ebrima* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*estr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*estr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*estr*_* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*euphemia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*euphemia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*euphemia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*franklingothic*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*franklingothic*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*franklingothic* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Gabriola*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Gabriola*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Gabriola* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*gautami*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gautami*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gautami* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*georgia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*georgia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*georgia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*gisha*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gisha*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gisha* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*iskoolapota*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*iskoolapota*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*iskoolapota* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kalinga*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kalinga*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kalinga* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kartika*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kartika*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kartika* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*KhmerUI*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*KhmerUI*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*KhmerUI* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kokila*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kokila*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kokila* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*LaoUI*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*LaoUI*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*LaoUI* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*latha*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*latha*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*latha* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*leelaw*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*leelaw*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*leelaw* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*lucidasans*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*lucidasans*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*lucidasans* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mangal*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mangal*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mangal* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mongolianbaiti*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mongolianbaiti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mongolianbaiti* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*moolbor*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*moolbor*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*moolbor* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mvboli*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mvboli*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mvboli* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*new_tai*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*new_tai*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*new_tai* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*nyala*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*nyala*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*nyala* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*pala*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*pala*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*pala* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*phagspa*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*phagspa*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*phagspa* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*plant*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*plant*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*plant* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*raavi*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*raavi*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*raavi* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*segoepr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*segoepr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*segoepr* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*segoesc*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*segoesc*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*segoesc* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Shonar*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Shonar*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Shonar* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*shruti*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*shruti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*shruti* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*sylfaen*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*sylfaen*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*sylfaen* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vani*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vani*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vani* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vijaya*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vijaya*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vijaya* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vrinda*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vrinda*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vrinda* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*tunga*.*
del /f /s /q d:\lite\mount\windows\winsxs\backup\*tunga*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*tunga* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*yibaiti*.*
del /f /s /q d:\lite\mount\windows\winsxs\backup\*yibaiti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*yibaiti* >>d:\lite\del_index.txt
:Normal
for /f %%j in (d:\lite\del_index.txt) do (rd %%j /s /q)
d:\lite\imagex /capture /compress maximum d:\lite\mount d:\lite\win7_lite.wim "Win7_lite"
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt ) do (rd %%j /s /q)
:rd_End
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
if exist d:\lite\mount goto rd_End
del /f /s /q d:\lite\del_index.txt
del /f /s /q d:\lite\del_rd.txt
del /f /s /q d:\lite\cal.txt
@echo Congratulations! You Win! Press Any Key,Exit.
强烈建议,大家先看完说明。
应部分坛友要求,我把本批处理的设计背景、执行效果、适用群体、设计思路、执行流程、和注意事项简要汇报如下,报告写多了,都八股文了。
1、设计背景
进入Vista、Win7 时代以后,系统动不动好几个G,甚至几十个G,我领导一个Sony 11.6 商务本,Vista business版,2007年左右的,太慢,叫我给他装系统,我一看单分区,也没有大型软件,除了电影、照片外,系统已经占了43个G了,它慢我晕啊。一部分机子的确不适合现在的系统了,不装精简的真的不行了,其实装了精简的也好不到哪里去,对于不会用电脑的人来说。另外,SSD盘对现在的系统也不感冒,它的空间性价比可不高啊,1G空间一寸金啊。还有Winsxs这个臭名昭著的文件夹,令全球使用者头疼啊。所以系统精简还是有一定生存空间的。这里又存在另外一个矛盾,现在的系统一精简就容易出问题,微软下的套了,还有好多无良恶意人士,专门搞内置木马的精简版,肉鸡逮住一个是一个。所以本批理应运而生,完全透明,完全开放,自己定制。
2、功用定位与执行效果
人所共知,现在精简Win7 做的比较好的是vLite和 RT 7 Lite,但是这两个软件运行前提是最好不要直接操作微软原始安装盘,需要一个修复过程(install.wim),即映像(我叫它镜像吧,懒得改口)应用与捕获个依次操作,还要清理文件,清理文件过程也特别恶心,要么新建分区,修复完格式化,要么取得控制权,慢慢处理(目前软件可以搞定,但算法都很垃圾,慢的要命),本批处理就是把这部分以前特别烦杂的工作完全自动化,省去很多人闻微软臭袜子的过程。本批处理定位于Win7、2008R2、Win8精简前期,中期,不与vLite和 RT 7 Lite直接竞争,使用本批处理精简完了可以用它们两个中任一个继续精简。vLite已经老了,RT 7 Lite也不适合Win8,但本批处理几乎通吃当前所有系统版本。温柔处理版大概精简Wim安装文件300M,精简系统安装后文件800M,精简系统安装后空间占用1.8G, 暴力剩女工程测试版,不好说,正紧张测试中。本批处理还可进行系统原始功能组件的快速调整,进行补丁的集成,进行驱动的个性定制。本批处理的精简效果的确不怎么样,但是如果你真正在从事这项工作,你一定会为它折服。本贴放在其他的网站首发可能更合适,但为了为自己一年潜水买单,我特意放在无忧启动论坛发。
3、使用人群
本批理不一定适合所有人群,本批处理适合对电脑有一定研究,对个性化定制有一定要求,会自己摸索系统的DIYer,适合单位批量安装、恢复和系统维护的管理员,适合专门做母盘的准专业人士。说微软设计的东西全都是经典的必须的、原版最稳定而精简后一定不稳定的,请闪开,说电脑不好用还不如电视简单的菜鸟,请闪开。
4、本批处理设计思路与执行流程。
思路:微软原始安装盘到处都是,并且映像组成又特别简单,5选1或4选1,当前前期、中期精简操作中用到的软件、程序、命令基本都包含在系统中,那完全可以通过系统静默调用的方式,加上一定的条件判断、流程控制,让电脑去执行你的暴力吧。
执行流程:
第一阶段:01-10分钟,准备工作。确定好自己要精简、调整和集成处理的系统版准备好必备软件,imagex,最好用最新版的,最好用64位的,最新版是6.2.8250.0,为什么要用64位系统,那个执行速度,真的赛过神8了。这里罗嗦一下,好机子绝对是享受啊,6.2.8250.0的imagex捕获(capture)时好像最多可以同开8个线程,处理8个文件,你说暴力吧。准备阶段可以看到有个D:\lite\mount文件夹暴力删除处理,这是为了防止上次运行本批处理出现意外,快速删除,为本次操作做准备。这里说明一下,for /f %%i in (d:\lite\del_rd.txt) do (if exist %%i (takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))这条命令真的好牛,遍历所有文件夹,每个文件夹,用管理员取得权限(takeown)、提升控制权(icacls)并同时删除(rd),win7 X32 Pro原版系统大约9000文件夹,70000文件,差不多5分钟删除完毕,比那个什么优化大师的右键取得管理员权限不知快多少倍,真不知道他们写的什么代码!为什么执行两次,还要循环,呵呵,都是微软下的套,第一是差不多10层深度的文件夹,难以处理,其二是有几个流氓文件夹,要好几次操作才能搞定。这两点都可以在rd_index.txt中看得一清二楚,你自己控制好rd_index.txt删除时机,或者复制一个全局文件,别删除,最后看一下。这是一点极速,相对市面同类软件,相对前一版本,前面说的“要么新建分区,修复完格式化,要么取得控制权,慢慢处理(目前软件可以搞定,但算法都很垃圾,慢的要命)”,在此迎刃而解,后续的工作还有突破性的。我K27第一阶段正常不到1分钟。
第二阶段:10-80分钟,挂载,调整,集成,卸载。开始和结束命令分别是挂载和卸载,中间分别是单条命令实现家庭高级版以上不常用组件禁用,注释掉的语句分别是英文版集成中文版补丁和中文设置,还有集成不名补丁,无视微软验证集成自己机子的专用驱动。这一阶段我K27(500G,单碟250G)只进行不常用组件禁用刚好10分钟。这一阶段,时间随个人补丁和驱动多少不定,自己掌握。
第三阶段:大约40分钟,应用,掌控,精简,捕获,清理。首先是捕获,然后是高速取得管理权限、提升控制权限,这里又跟第一阶段算法有很大不同。第一阶段,Dir遍历所有文件夹,重定向到rd_Index.txt,然后可以循环,就是后续遍历基础,高速取得管理权限、提升控制权限目的是删除,掌控同时就进行删除,当然后续不会再进行遍历,那个什么优化大师的右键取得管理员权限的代码估计就是这里没优化,取得管理权限命令takeown里有格参数/r,也是遍历,所有文件夹,再重复遍历不慢才怪!到了第二阶段,执行遍历同时不能删除如何是好,再重复遍历,连我家属都不会放过我的。这里卡了我两天进度,最后终于搞定:Dir遍历所有文件夹,重定向到rd_Index.txt,对每个文件夹,先看看他的权限表,icacls %%i >d:\lite\cal.txt,如果在权限表里发现有管理员名字:findstr %2 d:\lite\cal.txt,就是你执行本批处理的第二个参数,说明本文件夹已经被管理员控权,跳出本次循环,如果没发现,执行取得管理权限、提升控制权限,那个||就是个条件判断运算符,前面执行成功,后面不执行。这样一来它的执行效率跟第一阶段中代码相差无几,当然超长文件夹名和流氓文件夹也肯定存在,但不影响后续删减文件,先不管。然后就是删减。往后看,“温柔处理极速修订版与暴力剩女工程测试版分界线”,如果大家执行我这一版批处理只输入原来两个参数,它还是温柔处理版,只不过速度飙升,如果输入了参数,并且输对了参数,它就是暴力剩女工程测试版。
5、暴力剩女工程测试版,慎用,使用注意事项
这一版,现是第一稿,请懂得多提意见,直接执行,不会有什么好结果。当然,一般人可能根本到不了这个层次。期待高手啊!
温柔处理极速修订版,正常执行一次甚至仅仅60分钟,绝对是从来不曾有过这样的感觉啊!
暴力剩女工程测试版,真诚希望高手斧正啊!
所有问题,请大家说清楚版本、现象,我都不放过;任何一条建议,我都喜欢;但任何一条建议,如不在本论坛,我肯定没精力管,我还要上班呢!
@echo 第一阶段,01-05分钟,准备工作。
if exist d:\lite\iso\sources goto okISO
@echo 兄弟,ISO文件提取不对,解压好,按任意键继续。
pause
:okISO
if not "%1%"=="" goto okArguments
@echo 兄弟,没输参数,任意键退出。
pause
goto ESC
:okArguments
if not exist d:\lite\mount goto md
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do (if exist %%i (takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
:rd_Prepare
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
if exist d:\lite\mount goto rd_Prepare
:md
md d:\lite\mount
if exist d:\lite\imagex.exe goto existImagex
echo 兄弟,请复制imagex吧,OK了,再按任意键继续。
pause
:existImagex
del /f /s /q d:\lite\win7_lite.wim
@echo 尊敬的,我要开工了!
pause
@echo 第二阶段,10-80分钟,挂载,调整,集成,卸载。
dism /mount-wim /wimfile:d:\lite\iso\sources\install.wim /index:%1 /mountdir:d:\lite\mount
Dism /Image:d:\lite\mount /Disable-Feature /FeatureName:TabletPCOC /FeatureName:WindowsGadgetPlatform /FeatureName:MediaCenter /FeatureName:FaxServicesClientPackage /FeatureName:Printing-XPSServices-Features /FeatureName:Xps-Foundation-Xps-Viewer /FeatureName:Printing-Foundation-InternetPrinting-Client /FeatureName:Hearts /FeatureName:Solitaire /FeatureName:SpiderSolitaire /FeatureName:FreeCell /FeatureName:Minesweeper /FeatureName:PurblePlace /FeatureName:Chess /FeatureName:Shanghai /FeatureName:InboxGames
dism /image:d:\lite\mount /add-package /packagepath:d:\lite\lp.cab
dism /image:d:\lite\mount /set-uilang:zh-cn
::dism /image:d:\lite\mount /add-package /packagepath:d:\lite\myPackagePath
::Dism /Image:d:\lite\mount /add-driver /driverpath:d:\lite\MyDriver /recurse /forceunsigned
Dism /unmount-wim /mountdir:d:\lite\mount /commit
@echo 第三阶段,大约60分钟,应用,掌控,精简,捕获。
d:\lite\imagex /apply d:\lite\iso\sources\install.wim %1 d:\lite\mount
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((icacls %%i >d:\lite\cal.txt)&((findstr %2 d:\lite\cal.txt)||((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f ))))
del /f /s /q d:\lite\mount\windows\system32\recovery\ winre.wim
del /f /s /q d:\lite\mount\windows\winsxs\*ati*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ati*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*ati*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ati*inf* >d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*ati*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*nv*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*nv*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*nv*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*nv*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*nv*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*flpy*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*flpy*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*flpy*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*flpy* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*flpy* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*wia*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*wia*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*wia*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*wia*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*wia*inf* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*fax*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*fax*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*fax*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*fax* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*fax* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*mdm*inf*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mdm*inf*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*mdm*inf*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mdm*inf* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*mdm*inf* >>d:\lite\del_index.txt
::干掉兄弟打印机驱动,prnbr。
del /f /s /q d:\lite\mount\windows\winsxs\*prnb*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnb*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnb*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnb* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnb* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnc*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnc*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnc*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnc* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnc* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnfx*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnfx*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnfx*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnfx* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnfx* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prng*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prng*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prng*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prng* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prng* >>d:\lite\del_index.txt
::del /f /s /q d:\lite\mount\windows\winsxs\*prne*.*
::del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prne*.*
::dir /ad /b /s d:\lite\mount\windows\winsxs\*prne* >>d:\lite\del_index.txt
::del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prne*.*
::dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prne* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnh*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnh*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnh*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnh* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnh* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prni*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prni*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prni*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prni* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prni* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnk*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnk*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnk*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnk* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnk* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnl*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnl*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnl*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnl* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnl* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnn*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnn*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnn*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnn* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnn* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prno*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prno*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prno*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prno* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prno* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnr*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnr* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnr* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prns*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prns*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prns*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prns* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prns* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnt*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnt*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnt*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnt* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnt* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*prnx*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*prnx*.*
del /f /s /q d:\lite\mount\windows\system32\driverstore\filerepository\*prnx*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*prnx* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\driverstore\filerepository\*prnx* >>d:\lite\del_index.txt
温柔处理极速修订版与暴力剩女工程测试版分界线
if not %3==s goto Normal
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mediacenter*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mediacenter* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ehome*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ehome* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gadget*.*
del /f /s /q d:\lite\mount\windows\winsxs\*gadget*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gadget* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*sidebar*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*sidebar* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\help\mui\0804\*chm*.*
del /f /s /q d:\lite\mount\windows\help\mui\0409\*chm*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*chm*.*
del /f /s /q d:\lite\mount\windows\winsxs\*chm*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*chm* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*naturallanguage* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*tablet*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*tablet* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*videosample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\users\*videosample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*musicsample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\users\*musicsample* >>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*performance* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*xps*viewer*.*
del /f /s /q d:\lite\mount\windows\winsxs\*XPSServices*.*
::del /f /s /q d:\lite\mount\windows\winsxs\manifests\*speech*.*
::del /f /s /q d:\lite\mount\windows\winsxs\*speech*.*
::dir /ad /b /s d:\lite\mount\windows\winsxs\*speech* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Backgammon*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Backgammon* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Checkers*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Checkers* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Spades*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Spades* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Shanghai*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Shanghai* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Chess*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Chess* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*PurblePlace*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*PurblePlace* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Minesweeper*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Minesweeper* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*SpiderSolitaire*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*SpiderSolitaire* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*hearts*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*hearts* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Solitaire*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Solitaire* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\*imejp*.*
del /f /s /q d:\lite\mount\windows\winsxs\*imekr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*imejp*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*imekr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\ime\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\ime\*imejp*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\winsxs\*imekr*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\ime\*imekr*.*>>d:\lite\del_index.txt
dir /ad /b /s d:\lite\mount\windows\system32\ime\*imekr*.*>>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*aparaj*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*aparaj*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*aparaj* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Candara*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Candara*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Candara* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*comic*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*comic*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*comic* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*consola*_*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*consola*_*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*consola* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*constan*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*constan*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*constan* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*corbel*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*corbel*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*corbel* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*cordia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*cordia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*cordia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*daunpenh*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*daunpenh*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*daunpenh* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*dokchamp*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*dokchamp*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*dokchamp* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*ebrima*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*ebrima*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*ebrima* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*estr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*estr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*estr*_* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*euphemia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*euphemia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*euphemia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*franklingothic*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*franklingothic*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*franklingothic* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Gabriola*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Gabriola*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Gabriola* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*gautami*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gautami*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gautami* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*georgia*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*georgia*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*georgia* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*gisha*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*gisha*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*gisha* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*iskoolapota*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*iskoolapota*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*iskoolapota* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kalinga*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kalinga*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kalinga* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kartika*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kartika*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kartika* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*KhmerUI*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*KhmerUI*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*KhmerUI* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*kokila*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*kokila*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*kokila* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*LaoUI*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*LaoUI*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*LaoUI* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*latha*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*latha*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*latha* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*leelaw*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*leelaw*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*leelaw* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*lucidasans*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*lucidasans*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*lucidasans* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mangal*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mangal*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mangal* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mongolianbaiti*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mongolianbaiti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mongolianbaiti* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*moolbor*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*moolbor*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*moolbor* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*mvboli*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*mvboli*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*mvboli* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*new_tai*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*new_tai*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*new_tai* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*nyala*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*nyala*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*nyala* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*pala*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*pala*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*pala* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*phagspa*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*phagspa*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*phagspa* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*plant*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*plant*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*plant* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*raavi*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*raavi*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*raavi* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*segoepr*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*segoepr*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*segoepr* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*segoesc*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*segoesc*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*segoesc* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*Shonar*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*Shonar*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*Shonar* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*shruti*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*shruti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*shruti* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*sylfaen*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*sylfaen*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*sylfaen* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vani*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vani*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vani* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vijaya*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vijaya*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vijaya* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\backup\*vrinda*.*
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*vrinda*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*vrinda* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*tunga*.*
del /f /s /q d:\lite\mount\windows\winsxs\backup\*tunga*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*tunga* >>d:\lite\del_index.txt
del /f /s /q d:\lite\mount\windows\winsxs\manifests\*yibaiti*.*
del /f /s /q d:\lite\mount\windows\winsxs\backup\*yibaiti*.*
dir /ad /b /s d:\lite\mount\windows\winsxs\*yibaiti* >>d:\lite\del_index.txt
:Normal
for /f %%j in (d:\lite\del_index.txt) do (rd %%j /s /q)
d:\lite\imagex /capture /compress maximum d:\lite\mount d:\lite\win7_lite.wim "Win7_lite"
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt ) do (rd %%j /s /q)
:rd_End
dir d:\lite\mount /ad /b /s >d:\lite\del_rd.txt
for /f %%i in (d:\lite\del_rd.txt) do ((takeown /f %%i /r /d y >d:\lite\log.txt)&(@echo y|icacls %%i /t /q /grant %2:f )&(rd %%i /s /q))
takeown /f d:\lite\mount /r /d y >d:\lite\log.txt
@echo y|icacls d:\lite\mount /t /q /grant %2:f
rd d:\lite\mount /s /q
if exist d:\lite\mount goto rd_End
del /f /s /q d:\lite\del_index.txt
del /f /s /q d:\lite\del_rd.txt
del /f /s /q d:\lite\cal.txt
@echo Congratulations! You Win! Press Any Key,Exit.
附件:Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版。
另外:刚刚我另外帖子:另类一键备份、还原中,自己想删除流氓文件夹方法,可以在Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版找到,两条命令,Easy!
另外:刚刚我另外帖子:另类一键备份、还原中,自己想删除流氓文件夹方法,可以在Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版找到,两条命令,Easy!
对楼主这个批处理我表示无比的蛋疼 ~!!!
折腾了一下午了 依旧是问题不断 ..
每次都是到这一步d:\lite\imagex /capture /compress maximum d:\lite\mount d:\lite\win7_lite.wim "Win7_lite"
重新打包镜像生成为"win7_lite.wim" 差不多到44%左右 ...瞬间自动关机 看都来不及看是什么问题就挂了 无比蛋疼
算了 还是用回R 7 lite 太纠结了 ...= =!
折腾了一下午了 依旧是问题不断 ..
每次都是到这一步d:\lite\imagex /capture /compress maximum d:\lite\mount d:\lite\win7_lite.wim "Win7_lite"
重新打包镜像生成为"win7_lite.wim" 差不多到44%左右 ...瞬间自动关机 看都来不及看是什么问题就挂了 无比蛋疼
算了 还是用回R 7 lite 太纠结了 ...= =!
以上是关于Win7全自动精简批处理_温柔处理极速修正版/暴力剩女工程测试版的主要内容,如果未能解决你的问题,请参考以下文章
深度技术GHOST WIN7系统32.64位j极速安装版 V2016年
SolidWorks_2019_极速翱翔精简版 详细安装步骤