設定預設同意 的登錄值 DefaultConsent (HKCU Consent)使用者HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent

原則 ID
WerDefaultConsent_1
適用範圍
使用者設定
支援的作業系統
僅限 Windows 8.1、Windows 8、Windows 7 與 Windows Vista
來源
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
類別
Windows 元件 › Windows 錯誤報告 › 同意

登錄

DefaultConsent

REG_DWORD使用者
啟用時的值
取決於選項值
元素
同意層級
選項
項目儲存的值
傳送資料前一律詢問1
傳送參數2
傳送參數與安全性其他資料3
傳送所有資料4
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent]

; 選項 (只使用其中一個)
; 傳送資料前一律詢問
"DefaultConsent"=dword:00000001
; 傳送參數
"DefaultConsent"=dword:00000002
; 傳送參數與安全性其他資料
"DefaultConsent"=dword:00000003
; 傳送所有資料
"DefaultConsent"=dword:00000004
CMD
:: 選項 (只使用其中一個)

:: 傳送資料前一律詢問
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 1 /f
:: 傳送參數
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 2 /f
:: 傳送參數與安全性其他資料
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 3 /f
:: 傳送所有資料
reg add "HKCU\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 4 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Force | Out-Null

# 選項 (只使用其中一個)
# 傳送資料前一律詢問
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 1 -Force | Out-Null
# 傳送參數
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 2 -Force | Out-Null
# 傳送參數與安全性其他資料
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 3 -Force | Out-Null
# 傳送所有資料
New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 4 -Force | Out-Null