win10禁用windows错误报告Werfault.exe
windows错误报告网上有一种方法是使用组策略来禁用,但我在win10家庭版中试过后没有效果,依然经常有Werfault.exe自动运行出来,并且较占cpu,再次搜索方法,找到如下:
复制以下代码存为bat文件,以管理员身份运行即可禁用windows错误报告:
rem Disable Microsoft Support Diagnostic Tool MSDT reg add "HKLM\Software\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy" /v "DisableQueryRemoteServer" /t REG_DWORD /d "0" /f reg add "HKLM\Software\Policies\Microsoft\Windows\ScriptedDiagnosticsProvider\Policy" /v "EnableQueryRemoteServer" /t REG_DWORD /d "0" /f rem Disable System Debugger (Dr. Watson) reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug" /v "Auto" /t REG_SZ /d "0" /f rem 1 - Disable Windows Error Reporting (WER) reg add "HKLM\Software\Microsoft\PCHealth\ErrorReporting" /v "DoReport" /t REG_DWORD /d "0" /f reg add "HKLM\Software\Microsoft\PCHealth\ErrorReporting" /v "ShowUI" /t REG_DWORD /d "0" /f reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d "1" /f rem DefaultConsent / 1 - Always ask (default) / 2 - Parameters only / 3 - Parameters and safe data / 4 - All data reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d "0" /f reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultOverrideBehavior" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d "0" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultOverrideBehavior" /t REG_DWORD /d "1" /f rem 1 - Disable WER sending second-level data reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d "1" /f rem 1 - Disable WER crash dialogs, popups reg add "HKLM\Software\Microsoft\PCHealth\ErrorReporting" /v "ShowUI" /t REG_DWORD /d "0" /f reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d "1" /f rem 1 - Disable WER logging reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d "1" /f reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d "1" /f schtasks /Change /TN "Microsoft\Windows\ErrorDetails\EnableErrorDetailsUpdate" /Disable schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable rem Windows Error Reporting Service sc config WerSvc start= disabled rem Remove Windows Errror Reporting (to restore run "sfc /scannow") takeown /f "%WinDir%\System32\WerFault.exe" /a icacls "%WinDir%\System32\WerFault.exe" /grant:r Administrators:F /c taskkill /im WerFault.exe /f del "%WinDir%\System32\WerFault.exe" /s /f /q takeown /f "%WinDir%\System32\WerFaultSecure.exe" /a icacls "%WinDir%\System32\WerFaultSecure.exe" /grant:r Administrators:F /c taskkill /im WerFaultSecure.exe /f del "%WinDir%\System32\WerFaultSecure.exe" /s /f /q takeown /f "%WinDir%\System32\wermgr.exe" /a icacls "%WinDir%\System32\wermgr.exe" /grant:r Administrators:F /c taskkill /im wermgr.exe /f del "%WinDir%\System32\wermgr.exe" /s /f /q
此方法来自:https://www.tenforums.com/general-support/132671-cannot-disable-error-reporting-service.html
微软官方说明:https://docs.microsoft.com/en-us/windows/desktop/wer/wer-settings