按照以下步骤操作,使用“添加角色和功能向导”在运行 Windows Server 2012 R2 或更早版本的服务器上安装桌面体验。 此过程还会安装磁盘清理工具。
Windows Server 2012 R2 或更早版本中不存在磁盘清理工具 (cleanmgr.exe),除非安装了桌面体验功能。
若要使用 cleanmgr.exe,请安装前面所述的桌面体验,或复制服务器上已存在的 cleanmgr.exe 和 cleanmgr.exe.mui 两个文件。 使用下表查找适用于你的操作系统的文件。
操作系统 | 体系结构 | 文件位置 |
---|---|---|
Windows Server 2008 R2 | 64 位 | C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe |
Windows Server 2008 R2 | 64 位 | C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui |
找到 cleanmgr.exe 并将该文件移动到 %systemroot%\System32 。
找到 cleanmgr.exe.mui 并将该文件移动到 %systemroot%\System32\en-US 。
可以通过从命令提示符窗口运行 Cleanmgr.exe,或者在搜索字段中选择“启动”并输入“Cleanmgr”来启动磁盘清理工具。
若要将“磁盘清理”按钮设置为显示在磁盘的“属性”对话框中,需要安装桌面体验功能,如上一部分所示。