在windows server 2008 R2上运行disk cleanup


通常情况下可以在开始-〉Accessories->system tools 里直接找到Disk cleanup

但是在windows server 2008 R2里, 找不到。


为了可以使用cleanmgr, 需要复制两个文件:cleanmgr.exe, cleanmgr.exe.mui


不同的服务器,会在不同的文件夹下找到:

Operating System

Architecture

File Location

Windows Server 2008 R2

64-bit

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe

Windows Server 2008 R2

64-bit

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui

Windows Server 2008

64-bit

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui

Windows Server 2008

64-bit

C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe.mui

Windows Server 2008

32-bit

C:\Windows\winsxs\x86_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_5dd66fed98a6c5bc\cleanmgr.exe.mui

Windows Server 2008

32-bit

C:\Windows\winsxs\x86_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_6d4436615d8bd133\cleanmgr.exe

(diagram from microsoft website)


一旦找到这两个文件后,将 cleanmgr.exe 复制到 System32文件夹下,将cleanmgr.exe.mui 复制到System32\en-US文件夹下。


然后运行command prompt, 直接敲入Cleanmgr.exe 然后enter, 就可以使用Cleanmgr了。(或者直接在start的search里敲入Cleanmgr.exe)


翻译自:https://technet.microsoft.com/en-us/library/Ff630161(v=WS.10).aspx

winsxs文件夹瘦身方法: vista,windows2008,windows7的许多系统组件(主要是动态库)被安装在windows\winsxs目录下, 但是,对于同一组件,由于升级以及其它原因,windows并没有删除低版本的同一组件。 所以这里的瘦身方法就是删除多余的低版本组件。 考虑到系统的稳定及兼容性,本工具仅只分离多余的低版本组件,并未作任何删除。 (不同大版本号的同一组件视为不同组件,也就是说仅只分离小版本号不同的组件) (同版本的不同语言组件同样视为不同组件,不作分离) 例如:组件 x86_microsoft-windows-i..ersandsecurityzones_31bf3856ad364e35在我的winsxs下有如下版本   ver: 8.0.6001.18702 视为不同组件,当然若有不同语言版本也视为不同组件,不作分离 ver: 6.0.6001.18000 ver: 6.0.6001.18023 ver: 6.0.6001.18063 ver: 6.0.6001.18099 ver: 6.0.6001.18157 ver: 6.0.6001.18203 ver: 6.0.6001.18226 ver: 6.0.6001.22120 ver: 6.0.6001.22167 ver: 6.0.6001.22212 ver: 6.0.6001.22288 ver: 6.0.6001.22355 ver: 6.0.6001.22389 使用方法: 1.取得windows\winsxs的管理员权限, 以管理员身份运行permission_Cwinsxs.bat(当前系统安装在C盘),大约要运行5分钟 或permission_Dwinsxs.bat(当前系统安装在D盘),安装其它盘的请自行修改。 2.copy "winsxsCleaner.exe" 到winsxs目录下,运行,大约要等3分钟或者更多 完成后,多余的动态库已经被转移到winsxs下的__redundance目录下 3.请自行处理__redundance目录,建议备份后再删除。 此法同样适用于windows7。 由此瘦身方法造成的任何缺失,损失和后果本人一概不于负责。 附上原代码,请放心使用
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值