Disable installing Windows apps on non-system volumes
Désactiver l'installation d'applications Windows pour les volumes non-système
Explanation
This policy setting allows you to manage installing Windows apps on additional volumes such as secondary partitions, USB drives, or SD cards.
If you enable this setting, you can't move or install Windows apps on volumes that are not the system volume.
If you disable or do not configure this setting, you can move or install Windows apps on other volumes.
Ce paramètre de stratégie vous permet de gérer l'installation des applications Windows sur des volumes système, tels que des partitions secondaires, des lecteurs USB ou des cartes SD.
Si vous activez ce paramètre, vous ne pouvez pas déplacer ou installer des applications Windows sur d'autres volumes que le volume système.
Si vous désactivez ou ne configurez pas ce paramètre, vous pouvez déplacer ou installer des applications Windows sur d'autres volumes.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx- Value name
RestrictAppToSystemVolume
| 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: AppxPackageManager/DisableDeploymentToNonSystemVolumes
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RestrictAppToSystemVolume' -Value 1 -Type DWordDisable
# Disable: AppxPackageManager/DisableDeploymentToNonSystemVolumes
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RestrictAppToSystemVolume' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": AppxPackageManager/DisableDeploymentToNonSystemVolumes
$k = 'HKLM:\Software\Policies\Microsoft\Windows\Appx'
Remove-ItemProperty -Path $k -Name 'RestrictAppToSystemVolume' -ErrorAction SilentlyContinue