Don't run specified Windows applications
Ne pas exécuter les applications Windows spécifiées
Explanation
Prevents Windows from running the programs you specify in this policy setting.
If you enable this policy setting, users cannot run programs that you add to the list of disallowed applications.
If you disable this policy setting or do not configure it, users can run any programs.
This policy setting only prevents users from running programs that are started by the File Explorer process. It does not prevent users from running programs, such as Task Manager, which are started by the system process or by other processes. Also, if users have access to the command prompt (Cmd.exe), this policy setting does not prevent them from starting programs in the command window even though they would be prevented from doing so using File Explorer.
Note: Non-Microsoft applications with Windows 2000 or later certification are required to comply with this policy setting.
Note: To create a list of allowed applications, click Show. In the Show Contents dialog box, in the Value column, type the application executable name (e.g., Winword.exe, Poledit.exe, Powerpnt.exe).
Empêche Windows d’exécuter les programmes spécifiés dans ce paramètre de stratégie.
Si vous activez ce paramètre de stratégie, les utilisateurs ne peuvent pas exécuter les programmes que vous ajoutez à la liste des applications non autorisées.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les utilisateurs peuvent exécuter tous les programmes.
Ce paramètre de stratégie empêche uniquement les utilisateurs d’exécuter des programmes qui sont démarrés par le processus de l’Explorateur de fichiers. L’exécution de programmes lancés par le processus système ou par d’autres processus, tels que le Gestionnaire des tâches, demeure autorisée pour les utilisateurs. De plus, si les utilisateurs ont accès à l’invite de commandes (Cmd.exe), ce paramètre de stratégie ne les empêche pas de démarrer des programmes dans la fenêtre de commandes alors que cela ne serait pas possible dans l’Explorateur de fichiers.
Remarque : les applications tierces disposant d’une certification Windows 2000 ou version ultérieure doivent impérativement se conformer à ce paramètre de stratégie.
Remarque : pour créer une liste des applications autorisées, cliquez sur Afficher. Indiquez le nom du fichier exécutable de l’application (par exemple, Winword.exe, Poledit.exe, Powerpnt.exe) dans la colonne Valeur de la boîte de dialogue Afficher le contenu.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
DisallowRun
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX (see the options below) |
| Disabled | not defined in the ADMX (see the options below) |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.
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: Shell-CommandPrompt-RegEditTools/DisallowApps
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'DisallowRun' -Value 1 -Type DWord # assumed value (not defined in the ADMX)
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# List of disallowed applications
# 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: Shell-CommandPrompt-RegEditTools/DisallowApps
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'DisallowRun' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": Shell-CommandPrompt-RegEditTools/DisallowApps
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'DisallowRun' -ErrorAction SilentlyContinue
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details |
|---|---|---|---|---|
| List of disallowed applicationsListe des applications non autoriséesDisallowAppsList | List (table)list | Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRunValues named “” + number | REG_SZ (values under the key) |