I had some issues with my Windows 10 computer at home. I did some research, and came up with this batch file to freshen and check all of the operating system files. Save this as Fix10.cmd (or Fix10.bat) and run it with admin rights.
@echo off REM Fix10.cmd REM Alan Kaplan www.akaplan.com/blog REM This batch file automates the DISM restore health and SFC commands for Windows 10 REM 11/27/16 rem Test for Win 10 ver | find "10.0" > nul IF %ERRORLEVEL%==0 ( REM Echo Windows 10 found, continuing ) ELSE ( ECHO This was written for Windows 10. Quitting. goto :eof ) rem DISM requires elevation. Rerun if not so REM Peter Mortensen's method, http://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-administrator net file 1>nul 2>nul && goto :Main || powershell -ex unrestricted -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c %~fnx0 %*'" goto :eof :Main Echo Running DISM Restore Health Title Running Windows 10 File Integrity Command 1 of 4 REM these are preliminary commands found on Technet not in KB article, below Echo It will take several minutes for the commands to be completed. %windir%\system32\Dism.exe /Online /Cleanup-Image /ScanHealth Title Running Windows 10 File Integrity Command 2 of 4 %windir%\system32\Dism.exe /Online /Cleanup-Image /CheckHealth REM commands and text from https://support.microsoft.com/en-us/kb/947821 Title Running Windows 10 File Integrity Command 3 of 4 DISM.exe /Online /Cleanup-image /Restorehealth rem Important: When you run this command, DISM uses Windows Update to provide the files that are required to fix corruptions. rem However, if your Windows Update client is already broken, use a running Windows installation as the repair source, rem or use a Windows side-by-side folder from a network share or from a removable media, rem such as the Windows DVD, as the source of the files. rem To do this, run the following command instead: rem DISM.exe /Online /Cleanup-Image /RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess rem Note Replace the C:\RepairSource\Windows placeholder with the location of your repair source. echo It will take several minutes for the command operation to be completed. Title Running Windows 10 File Integrity Command 4 of 4 sfc /scannow echo Launching Windows Update now. Please check for updates. The repair log will open in notepad. pause REM open Windows Update dialog explorer ms-settings:windowsupdate start %windir%/Logs/CBS/CBS.log