Turn off shared components
Désactiver les composants partagés
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.
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
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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 DWordDisable
# 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 DWordRevert to "Not configured"
# Revert to "Not configured": MSI/DisableSharedComponent
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Installer'
Remove-ItemProperty -Path $k -Name 'DisableSharedComponent' -ErrorAction SilentlyContinue