Open in the explorer

Turn on dynamic Content URI Rules for packaged Microsoft Store apps

Activer les règles d’URI de contenu dynamique pour les applications empaquetées du Microsoft Store

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › App runtime FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Exécution de l’application
Supported on
At least Windows Server 2012 R2, Windows 8.1 or Windows RT 8.1 FR: Au minimum Windows Server 2012 R2, Windows 8.1 ou Windows RT 8.1
ADMX file
AppXRuntime.admx
Internal name
AppXRuntime/AppxRuntimeApplicationContentUriRules

Explanation

This policy setting lets you turn on Content URI Rules to supplement the static Content URI Rules that were defined as part of the app manifest and apply to all packaged Microsoft Store apps that use the enterpriseAuthentication capability on a computer.

If you enable this policy setting, you can define additional Content URI Rules that all packaged Microsoft Store apps that use the enterpriseAuthentication capability on a computer can use.

If you disable or don't set this policy setting, packaged Microsoft Store apps will only use the static Content URI Rules.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet d’activer des règles d’URI de contenu en complément des règles d’URI de contenu statique qui ont été définies dans le cadre du manifeste d’application et de les appliquer à toutes les applications empaquetées du Microsoft Store qui utilisent la fonctionnalité enterpriseAuthentication sur un ordinateur.

Si vous activez ce paramètre de stratégie, vous pouvez définir des règles d’URI de contenu supplémentaires utilisables par toutes les applications empaquetées du Microsoft Store qui utilisent la fonctionnalité enterpriseAuthentication sur un ordinateur.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les applications empaquetées du Microsoft Store utilisent uniquement les règles d’URI de contenu statique.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications
Value name
EnableDynamicContentUriRules
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: AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -Value 1 -Type DWord
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRules'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Content URI Rules
# Non-additive list: existing values of the key are cleared first
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<value1>', '<value2>')  # Replace the values with your own
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }

Disable

# Disable: AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": AppXRuntime/AppxRuntimeApplicationContentUriRules
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications'
Remove-ItemProperty -Path $k -Name 'EnableDynamicContentUriRules' -ErrorAction SilentlyContinue
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRules'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Content URI Rules:Règles d’URI de contenu :ListBox_ContentUriRulesList (table)listSoftware\Microsoft\Windows\CurrentVersion\Policies\Packages\Applications\ContentUriRulesValues named “” + numberREG_SZ (values under the key)

Availability