When you run the System File Checker (Sfc.exe) using the
/scannow parameter to restore missing or corrupt system files, the following error may occur.
Additionally, you may experience problems running Windows Installer Setup files and installing fixes from Windows Update.
This happens if the TrustedInstaller (Windows Modules Installer) service is disabled. The TrustedInstaller service has full access to Windows Resource Protection (WRP) files and registry keys, and this services needs to be running in order to restore missing or corrupted WRP resources. The TrustedInstaller service starts on-demand when running the System File Checker.
Use these steps to reset the service startup type of Windows Modules Installer service.
1. Press Winkey + R to launch the Run dialog, type Services.msc, and press ENTER
2. Double-click Windows Modules Installer
3. Set its Startup type to Manual
4. Click OK.
To accomplish the same using command-line, open Command Prompt as administrator. Run the following commands and press ENTER after each line.
sc config trustedinstaller start= demand net start trustedinstaller
That should fix the problem. Another option would be to run
Sfc /scannow in offline mode (Windows Recovery Environment).
This article was originally written for Windows Vista and 7, but very much applies to Windows 8 and Windows 10 as well.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.