Always install with elevated privileges
Toujours installer avec des droits élevés
In Windows 10 1803, this policy replaces MSI/AlwaysInstallElevated_1 (renamed (same title)).
In Windows 10 1803, this policy replaces MSI/AlwaysInstallElevated_2 (renamed (same title)).
In Windows Server 2022, this policy replaces MSI/AlwaysInstallElevated_1 (renamed (same title)).
In Windows Server 2022, this policy replaces MSI/AlwaysInstallElevated_2 (renamed (same title)).
Explanation
This policy setting directs Windows Installer to use elevated permissions when it installs any program on the system.
If you enable this policy setting, privileges are extended to all programs. These privileges are usually reserved for programs that have been assigned to the user (offered on the desktop), assigned to the computer (installed automatically), or made available in Add or Remove Programs in Control Panel. This profile setting lets users install programs that require access to directories that the user might not have permission to view or change, including directories on highly restricted computers.
If you disable or do not configure this policy setting, the system applies the current user's permissions when it installs programs that a system administrator does not distribute or offer.
Note: This policy setting appears both in the Computer Configuration and User Configuration folders. To make this policy setting effective, you must enable it in both folders.
Caution: Skilled users can take advantage of the permissions this policy setting grants to change their privileges and gain permanent access to restricted files and folders. Note that the User Configuration version of this policy setting is not guaranteed to be secure.
Ce paramètre de stratégie indique à Windows Installer d’utiliser des autorisations élevées lors de l’installation d’un programme sur le système.
Si vous activez ce paramètre de stratégie, les privilèges sont étendus à tous les programmes. Ces privilèges sont généralement réservés aux programmes assignés à l’utilisateur (disponibles sur le Bureau), assignés à l’ordinateur (installés automatiquement) ou disponibles dans l’application Ajout/Suppression de programmes du Panneau de configuration. Ce paramètre de stratégie permet ainsi aux utilisateurs d’installer des programmes qui nécessitent l’accès à des répertoires qu’ils ne sont pas toujours autorisés à afficher ou à modifier, notamment les répertoires sur les ordinateurs à forte restriction.
Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, le système applique les autorisations de l’utilisateur actuel lorsqu’il installe des programmes qui ne sont pas distribués ou publiés par un administrateur.
Remarque : ce paramètre de stratégie apparaît à la fois dans les dossiers Configuration ordinateur et Configuration utilisateur. Pour rendre ce paramètre de stratégie effectif, vous devez l’activer dans les deux dossiers.
Attention : les utilisateurs avertis peuvent tirer parti des autorisations accordées par ce paramètre de stratégie pour modifier leurs privilèges et obtenir ainsi un accès permanent à des fichiers ou dossiers restreints. Notez que la version Configuration utilisateur de ce paramètre de stratégie ne garantit pas la sécurité.
Use cases
Do not enable it: this policy makes any .msi file launched by a user run as the System account, without telling an approved installer from a booby-trapped MSI: any user can craft a package that creates an administrator or opens a SYSTEM command prompt. Microsoft equates it with granting administrator rights.
It only takes effect when enabled in both Computer Configuration and User Configuration, but the safest course is to leave it disabled or not configured in both places and to check that no inherited GPO turns it on. To deploy software to users without admin rights, use an enterprise deployment tool (Configuration Manager, Intune, software installation GPO).
Microsoft source: “AlwaysInstallElevated” is Equivalent to Granting Administrative Rights
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\InstallerHKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer- Value name
AlwaysInstallElevated
| 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.
Computer (HKLM)
Enable
# Enable: MSI/AlwaysInstallElevated
$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 'AlwaysInstallElevated' -Value 1 -Type DWordDisable
# Disable: MSI/AlwaysInstallElevated
$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 'AlwaysInstallElevated' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": MSI/AlwaysInstallElevated
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Installer'
Remove-ItemProperty -Path $k -Name 'AlwaysInstallElevated' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"