Allow a Windows app to share application data between users
Autoriser une application Windows à partager des données d'applications entre les utilisateurs
Explanation
Manages a Windows app's ability to share data between users who have installed the app.
If you enable this policy, a Windows app can share app data with other instances of that app. Data is shared through the SharedLocal folder. This folder is available through the Windows.Storage API.
If you disable this policy, a Windows app can't share app data with other instances of that app. If this policy was previously enabled, any previously shared app data will remain in the SharedLocal folder.
Gère la possibilité pour une application Windows de partager des données entre les utilisateurs qui ont installé l’application.
Si vous activez ce paramètre de stratégie, une application Windows peut partager des données d’application avec d’autres instances de cette application. Les données sont partagées dans le dossier SharedLocal. Ce dossier est accessible via l’API Windows. Storage API.
Si vous désactivez ce paramètre de stratégie, les applications Windows ne peuvent pas partager des données d’applications avec d’autres instances de cette application. Si cette stratégie était activée précédemment, toutes les données d’application partagées précédemment sont conservées dans le dossier SharedLocal.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager- Value name
AllowSharedLocalAppData
| 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/AllowSharedLocalAppData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowSharedLocalAppData' -Value 1 -Type DWordDisable
# Disable: AppxPackageManager/AllowSharedLocalAppData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowSharedLocalAppData' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": AppxPackageManager/AllowSharedLocalAppData
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\AppModel\StateManager'
Remove-ItemProperty -Path $k -Name 'AllowSharedLocalAppData' -ErrorAction SilentlyContinue