設定預設同意 的登錄值 DefaultConsent (HKLM Consent)電腦HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent
- 原則 ID
- WerDefaultConsent_2
- 適用範圍
- 電腦設定
- 支援的作業系統
- 僅限 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_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent] ; 選項 (只使用其中一個) ; 傳送資料前一律詢問 "DefaultConsent"=dword:00000001 ; 傳送參數 "DefaultConsent"=dword:00000002 ; 傳送參數與安全性其他資料 "DefaultConsent"=dword:00000003 ; 傳送所有資料 "DefaultConsent"=dword:00000004
CMD
:: 選項 (只使用其中一個) :: 傳送資料前一律詢問 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 1 /f :: 傳送參數 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 2 /f :: 傳送參數與安全性其他資料 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 3 /f :: 傳送所有資料 reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent" /v "DefaultConsent" /t REG_DWORD /d 4 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Force | Out-Null # 選項 (只使用其中一個) # 傳送資料前一律詢問 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 1 -Force | Out-Null # 傳送參數 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 2 -Force | Out-Null # 傳送參數與安全性其他資料 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 3 -Force | Out-Null # 傳送所有資料 New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting\Consent' -Name 'DefaultConsent' -PropertyType DWord -Value 4 -Force | Out-Null