Open in the explorer

Turn off shared components

Désactiver les composants partagés

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
Windows Installer v4.5 FR: Windows Installer version 4.5
ADMX file
MSI.admx
Internal name
MSI/DisableSharedComponent

Explanation

This policy setting controls the ability to turn off shared components.

If you enable this policy setting, no packages on the system get the shared component functionality enabled by the msidbComponentAttributesShared attribute in the Component Table.

If you disable or do not configure this policy setting, by default, the shared component functionality is allowed.

French text from Windows 11 26H2

Ce paramètre de stratégie contrôle la possibilité de désactiver les composants partagés.

Si vous activez ce paramètre de stratégie, aucun package du système n’obtient la fonctionnalité de composant partagé activée par l’attribut msidbComponentAttributesShared dans la table des composants.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, par défaut, la fonctionnalité de composant partagé est autorisée.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer
Value name
DisableSharedComponent
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/DisableSharedComponent
$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 'DisableSharedComponent' -Value 1 -Type DWord

Disable

# Disable: MSI/DisableSharedComponent
$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 'DisableSharedComponent' -Value 0 -Type DWord

Revert to "Not configured"

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

Availability