en-US windows user

Notify antivirus programs when opening attachments

Verified with Windows 11 25H2 — updated on July 30, 2026

Windows 11 25H2

Supported on: At least Windows XP Professional with SP2

Path in the GPO console

User Configuration\Administrative Templates\Windows Components\Attachment Manager

Description

This policy setting allows you to manage the behavior for notifying registered antivirus programs. If multiple programs are registered, they will all be notified. If the registered antivirus program already performs on-access checks or scans files as they arrive on the computer's email server, additional calls would be redundant. If you enable this policy setting, Windows tells the registered antivirus program to scan the file when a user opens a file attachment. If the antivirus program fails, the attachment is blocked from being opened. If you disable this policy setting, Windows does not call the registered antivirus programs when file attachments are opened. If you do not configure this policy setting, Windows does not call the registered antivirus programs when file attachments are opened.

Registry

HKCU Software\Microsoft\Windows\CurrentVersion\Policies\Attachments

Value name: ScanWithAntiVirus

Enabled: ScanWithAntiVirus = 3

Disabled: ScanWithAntiVirus = 1

MDM / Intune (CSP)

./User/Vendor/MSFT/Policy/Config/AttachmentManager/NotifyAntivirusPrograms
User Since Windows 10, version 1703 [10.0.15063] and later Official mapping (Microsoft Learn)

Microsoft Learn documentation Mapping data: Microsoft Learn (CC BY 4.0)

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Notify antivirus programs when opening attachments
; State: Enabled
; Supported on: At least Windows XP Professional with SP2

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"ScanWithAntiVirus"=dword:00000003
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Notify antivirus programs when opening attachments
# State: Enabled
# Supported on: At least Windows XP Professional with SP2
# Warning: In SYSTEM context (the Intune default), HKCU targets the SYSTEM profile. Run this script using the logged-on credentials.

$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'ScanWithAntiVirus' -Value 3 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview