Open in the explorer

Prevent users' app data from being stored on non-system volumes

Empêcher le stockage des données d'applications des utilisateurs sur des volumes non-système

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › App Package Deployment FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Déploiement de package Appx
Supported on
At least Windows 8.1 Update 2 FR: Au minimum Windows 8.1 mise à jour 2
ADMX file
AppxPackageManager.admx
Internal name
AppxPackageManager/RestrictAppDataToSystemVolume

Explanation

Prevent users' app data from moving to another location when an app is moved or installed on another location.

If you enable this setting, all users' app data will stay on the system volume, regardless of where the app is installed.

If you disable or do not configure this setting, then when an app is moved to a different volume, the users' app data will also move to this volume.

French text from Windows 11 26H2

Empêcher le déplacement des données d'applications des utilisateurs vers un autre emplacement lors du déplacement ou de l'installation d'une application à un autre emplacement.

Si vous activez ce paramètre, toutes les données d'applications des utilisateurs seront conservées sur le volume système, quel que soit l'emplacement d'installation de l'application.

Si vous désactivez ou ne configurez pas ce paramètre, lorsqu'une application est déplacée vers un autre volume, les données d'applications des utilisateurs sont également déplacées vers ce volume.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx
Value name
RestrictAppDataToSystemVolume
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: AppxPackageManager/RestrictAppDataToSystemVolume
$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 'RestrictAppDataToSystemVolume' -Value 1 -Type DWord

Disable

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

Revert to "Not configured"

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

Availability