檔案附件的預設風險層級 的登錄值 DefaultFileTypeRisk使用者HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations
- 原則 ID
- AM_SetFileRiskLevel
- 適用範圍
- 使用者設定
- 支援的作業系統
- 至少需要 Windows XP Professional SP2
- 來源
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (版本 1.0)
- 類別
- Windows 元件 › 附件管理員
登錄
DefaultFileTypeRisk
REG_DWORD使用者- 啟用時的值
- 取決於選項值
- 元素
- 設定預設風險層級
| 項目 | 儲存的值 |
|---|---|
| 高度風險 | 6150 |
| 中度風險 | 6151 |
| 低度風險 | 6152 |
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations] ; 選項 (只使用其中一個) ; 高度風險 "DefaultFileTypeRisk"=dword:00001806 ; 中度風險 "DefaultFileTypeRisk"=dword:00001807 ; 低度風險 "DefaultFileTypeRisk"=dword:00001808
CMD
:: 選項 (只使用其中一個) :: 高度風險 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /v "DefaultFileTypeRisk" /t REG_DWORD /d 6150 /f :: 中度風險 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /v "DefaultFileTypeRisk" /t REG_DWORD /d 6151 /f :: 低度風險 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /v "DefaultFileTypeRisk" /t REG_DWORD /d 6152 /f
PowerShell
# 共通: 建立機碼 New-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations' -Force | Out-Null # 選項 (只使用其中一個) # 高度風險 New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations' -Name 'DefaultFileTypeRisk' -PropertyType DWord -Value 6150 -Force | Out-Null # 中度風險 New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations' -Name 'DefaultFileTypeRisk' -PropertyType DWord -Value 6151 -Force | Out-Null # 低度風險 New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Associations' -Name 'DefaultFileTypeRisk' -PropertyType DWord -Value 6152 -Force | Out-Null