Open in the explorer

Prevent Internet Explorer security prompt for Windows Installer scripts

Désactiver la confirmation de sécurité Internet Explorer pour les scripts de Windows Installer

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Windows Installer FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Windows Installer
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
MSI.admx
Internal name
MSI/SafeForScripting

Explanation

This policy setting allows Web-based programs to install software on the computer without notifying the user.

If you disable or do not configure this policy setting, by default, when a script hosted by an Internet browser tries to install a program on the system, the system warns users and allows them to select or refuse the installation.

If you enable this policy setting, the warning is suppressed and allows the installation to proceed.

This policy setting is designed for enterprises that use Web-based tools to distribute programs to their employees. However, because this policy setting can pose a security risk, it should be applied cautiously.

French text from Windows 11 26H2

Ce paramètre de stratégie permet aux programmes Web d’installer des logiciels sur l’ordinateur sans en informer l’utilisateur.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, par défaut, lorsqu’un script hébergé par un navigateur Internet tente d’installer un programme sur le système, le système avertit les utilisateurs afin qu’ils puissent sélectionner ou refuser l’installation.

Si vous activez ce paramètre de stratégie, l’avertissement est supprimé et l’installation est autorisée à se poursuivre.

Ce paramètre de stratégie est destiné aux entreprises qui utilisent des outils Web pour distribuer des programmes à leurs employés. En raison des éventuels risques de sécurité que peut poser ce paramètre de stratégie, celui-ci doit être appliqué avec précautions.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Value name
SafeForScripting
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

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: MSI/SafeForScripting
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Installer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SafeForScripting' -Value 1 -Type DWord

Disable

# Disable: MSI/SafeForScripting
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Installer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'SafeForScripting' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": MSI/SafeForScripting
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Installer'
Remove-ItemProperty -Path $k -Name 'SafeForScripting' -ErrorAction SilentlyContinue

Availability