Notify antivirus programs when opening attachments
Avertir les antivirus lors de l’ouverture des pièces jointes
Explanation
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.
Ce paramètre de stratégie vous permet de gérer la notification des antivirus inscrits. Si plusieurs antivirus sont inscrits, ils sont tous notifiés. Si l’antivirus inscrit effectue déjà des tests lors de l’accès aux fichiers ou analyse les fichiers lorsqu’ils arrivent sur le serveur de messagerie de l’ordinateur, tout appel supplémentaire serait redondant.
Si vous activez ce paramètre de stratégie, Windows demande à l’antivirus inscrit d’analyser le fichier lorsque l’utilisateur ouvre une pièce jointe. Si l’antivirus échoue, la pièce jointe est bloquée et ne peut pas être ouverte.
Si vous désactivez ce paramètre de stratégie, Windows n’appelle pas les antivirus inscrits lorsque des pièces jointes sont ouvertes.
Si vous ne configurez pas ce paramètre de stratégie, Windows n’appelle pas les antivirus inscrits lorsque des pièces jointes sont ouvertes.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments- Value name
ScanWithAntiVirus
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 3 |
| Disabled | REG_DWORD = 1 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: AttachmentManager/AM_CallIOfficeAntiVirus
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScanWithAntiVirus' -Value 3 -Type DWordDisable
# Disable: AttachmentManager/AM_CallIOfficeAntiVirus
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScanWithAntiVirus' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": AttachmentManager/AM_CallIOfficeAntiVirus
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments'
Remove-ItemProperty -Path $k -Name 'ScanWithAntiVirus' -ErrorAction SilentlyContinue