VBA Macro Notification Settings: registry value vbawarnings and 3 more (visio\security)UserHKCU\software\policies\microsoft\office\16.0\visio\security
- Policy ID
- L_VBAWarningsPolicy
- Scope
- User Configuration
- Supported on
- At least Windows Server 2008 R2 or Windows 7
- Source
- Microsoft 365 Apps / Office Administrative Templates (version 5568.1000)
- Category
- Microsoft Visio 2016 › Visio Options › Security › Trust Center
Registry
vbawarnings
REG_DWORDUser- Enabled value
- Depends on the option value
- Element
- -
| Item | Stored value |
|---|---|
| Disable all with notification | 2 |
| Disable all except digitally signed macros | 3 |
| Disable all without notification | 4 |
| Enable all macros (not recommended) | 1 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\security] ; Options (use only one) ; Disable all with notification "vbawarnings"=dword:00000002 ; Disable all except digitally signed macros "vbawarnings"=dword:00000003 ; Disable all without notification "vbawarnings"=dword:00000004 ; Enable all macros (not recommended) "vbawarnings"=dword:00000001
CMD
:: Options (use only one) :: Disable all with notification reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbawarnings" /t REG_DWORD /d 2 /f :: Disable all except digitally signed macros reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbawarnings" /t REG_DWORD /d 3 /f :: Disable all without notification reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbawarnings" /t REG_DWORD /d 4 /f :: Enable all macros (not recommended) reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbawarnings" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Force | Out-Null # Options (use only one) # Disable all with notification New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbawarnings' -PropertyType DWord -Value 2 -Force | Out-Null # Disable all except digitally signed macros New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbawarnings' -PropertyType DWord -Value 3 -Force | Out-Null # Disable all without notification New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbawarnings' -PropertyType DWord -Value 4 -Force | Out-Null # Enable all macros (not recommended) New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbawarnings' -PropertyType DWord -Value 1 -Force | Out-Null
vbadigsigtrustedpublishers
REG_DWORDUser- Checked
- 1
- Unchecked
- 0
- Element
- Require macros to be signed by a trusted publisher
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\security] ; Options (use only one) ; Checked "vbadigsigtrustedpublishers"=dword:00000001 ; Unchecked "vbadigsigtrustedpublishers"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbadigsigtrustedpublishers" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbadigsigtrustedpublishers" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbadigsigtrustedpublishers' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbadigsigtrustedpublishers' -PropertyType DWord -Value 0 -Force | Out-Null
vbarequirelmtrustedpublisher
REG_DWORDUser- Checked
- 1
- Unchecked
- 0
- Element
- Block certificates from trusted publishers that are only installed in the current user certificate store
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\security] ; Options (use only one) ; Checked "vbarequirelmtrustedpublisher"=dword:00000001 ; Unchecked "vbarequirelmtrustedpublisher"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbarequirelmtrustedpublisher" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbarequirelmtrustedpublisher" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbarequirelmtrustedpublisher' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbarequirelmtrustedpublisher' -PropertyType DWord -Value 0 -Force | Out-Null
vbarequiredigsigwithcodesigningeku
REG_DWORDUser- Checked
- 1
- Unchecked
- 0
- Element
- Require Extended Key Usage (EKU) for certificates from trusted publishers
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\software\policies\microsoft\office\16.0\visio\security] ; Options (use only one) ; Checked "vbarequiredigsigwithcodesigningeku"=dword:00000001 ; Unchecked "vbarequiredigsigwithcodesigningeku"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbarequiredigsigwithcodesigningeku" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKCU\software\policies\microsoft\office\16.0\visio\security" /v "vbarequiredigsigwithcodesigningeku" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbarequiredigsigwithcodesigningeku' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKCU:\software\policies\microsoft\office\16.0\visio\security' -Name 'vbarequiredigsigwithcodesigningeku' -PropertyType DWord -Value 0 -Force | Out-Null