Automation Security: wartość rejestru automationsecurityUżytkownikHKCU\software\policies\microsoft\office\common\security

Brak oficjalnego tekstu w tym języku (wyświetlono oryginał angielski)

Identyfikator zasady
L_AutomationSecurity
Zakres
Konfiguracja użytkownika
Obsługiwane w systemach
System Windows Server 2008 R2 lub nowszy albo system Windows 7
Źródło
Microsoft 365 Apps / Office Administrative Templates (wersja 5568.1000)
Kategoria
Microsoft Office 2016 › Security Settings

Rejestr

automationsecurity

REG_DWORDUżytkownik
Wartość włączona
Zależy od wartości opcji
Element
Set the Automation Security level
Opcje
PozycjaZapisana wartość
Disable macros by default3
Use application macro security level2
Macros enabled (default)1
Zastosuj przez .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\software\policies\microsoft\office\common\security]

; Opcje (użyj tylko jednej)
; Disable macros by default
"automationsecurity"=dword:00000003
; Use application macro security level
"automationsecurity"=dword:00000002
; Macros enabled (default)
"automationsecurity"=dword:00000001
CMD
:: Opcje (użyj tylko jednej)

:: Disable macros by default
reg add "HKCU\software\policies\microsoft\office\common\security" /v "automationsecurity" /t REG_DWORD /d 3 /f
:: Use application macro security level
reg add "HKCU\software\policies\microsoft\office\common\security" /v "automationsecurity" /t REG_DWORD /d 2 /f
:: Macros enabled (default)
reg add "HKCU\software\policies\microsoft\office\common\security" /v "automationsecurity" /t REG_DWORD /d 1 /f
PowerShell
# Wspólne: utwórz klucz
New-Item -Path 'HKCU:\software\policies\microsoft\office\common\security' -Force | Out-Null

# Opcje (użyj tylko jednej)
# Disable macros by default
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\common\security' -Name 'automationsecurity' -PropertyType DWord -Value 3 -Force | Out-Null
# Use application macro security level
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\common\security' -Name 'automationsecurity' -PropertyType DWord -Value 2 -Force | Out-Null
# Macros enabled (default)
New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\common\security' -Name 'automationsecurity' -PropertyType DWord -Value 1 -Force | Out-Null