Skip to content

Instantly share code, notes, and snippets.

@stanwu
Created August 2, 2016 09:07
Show Gist options
  • Select an option

  • Save stanwu/411f7f4b89779f2ad9cb7e1f9f77892f to your computer and use it in GitHub Desktop.

Select an option

Save stanwu/411f7f4b89779f2ad9cb7e1f9f77892f to your computer and use it in GitHub Desktop.
You have to install Glary Utilities first, 必須先安裝 Glary Utilities 這個工具 http://www.glarysoft.com/
@echo off
echo Clean SPx and upgrade cache...
DISM.exe /online /Cleanup-Image /StartComponentCleanup
DISM.exe /online /Cleanup-Image /SPSuperseded
DISM.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
echo Run Glary Utilities...
:CheckOS
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
"C:\Program Files (x86)\Glary Utilities 5\OneClickMaintenance.exe" /schedulestart
GOTO END
:32BIT
"C:\Program Files\Glary Utilities 5\OneClickMaintenance.exe" /schedulestart
GOTO END
:END
echo Disk cleanup...
c:\windows\SYSTEM32\cleanmgr.exe /d c: /sagerun:64
@stanwu

stanwu commented Aug 2, 2016

Copy link
Copy Markdown
Author

You have run as Administrator by right click menu, 您必須點擊滑鼠右鍵以系統管理員身份執行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment