使用者帳戶控制: 在管理員核准模式,系統管理員之提升權限提示的行為 的登錄值 ConsentPromptBehaviorAdmin電腦HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System

類別
安全性設定 › 本機原則 › 安全性選項
適用範圍
電腦設定
來源
Windows 11 (版本 26H2 · 26300.9457)

登錄

ConsentPromptBehaviorAdmin

REG_DWORD電腦
啟用時的值
取決於選項值
元素
使用者帳戶控制: 在管理員核准模式,系統管理員之提升權限提示的行為
選項
項目儲存的值
提高權限而不提示0
在安全桌面提示輸入認證1
在安全桌面提示要求同意2
提示輸入認證3
提示要求同意4
提示要求同意非 Windows 二進位檔案5
以 .reg · CMD · PowerShell 套用
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System]

; 選項 (只使用其中一個)
; 提高權限而不提示
"ConsentPromptBehaviorAdmin"=dword:00000000
; 在安全桌面提示輸入認證
"ConsentPromptBehaviorAdmin"=dword:00000001
; 在安全桌面提示要求同意
"ConsentPromptBehaviorAdmin"=dword:00000002
; 提示輸入認證
"ConsentPromptBehaviorAdmin"=dword:00000003
; 提示要求同意
"ConsentPromptBehaviorAdmin"=dword:00000004
; 提示要求同意非 Windows 二進位檔案
"ConsentPromptBehaviorAdmin"=dword:00000005
CMD
:: 選項 (只使用其中一個)

:: 提高權限而不提示
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f
:: 在安全桌面提示輸入認證
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 1 /f
:: 在安全桌面提示要求同意
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 2 /f
:: 提示輸入認證
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 3 /f
:: 提示要求同意
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 4 /f
:: 提示要求同意非 Windows 二進位檔案
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 5 /f
PowerShell
# 共通: 建立機碼
New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null

# 選項 (只使用其中一個)
# 提高權限而不提示
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 0 -Force | Out-Null
# 在安全桌面提示輸入認證
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 1 -Force | Out-Null
# 在安全桌面提示要求同意
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 2 -Force | Out-Null
# 提示輸入認證
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 3 -Force | Out-Null
# 提示要求同意
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 4 -Force | Out-Null
# 提示要求同意非 Windows 二進位檔案
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'ConsentPromptBehaviorAdmin' -PropertyType DWord -Value 5 -Force | Out-Null