Désactiver l’arrêt automatique des applications qui bloquent ou annulent l’arrêt de l’ordinateur
Turn off automatic termination of applications that block or cancel shutdown
Explication
Ce paramètre de stratégie spécifie si Windows permet ou non aux applications de console et aux applications d’interface utilisateur sans fenêtres de niveau supérieur visibles de bloquer ou d’annuler l’arrêt de l’ordinateur. Par défaut, ces applications sont automatiquement arrêtées si elles tentent d’annuler l’arrêt de l’ordinateur ou de le bloquer indéfiniment.
Si vous activez ce paramètre, les applications de console et les applications d’interface utilisateur sans fenêtres de niveau supérieur visibles qui bloquent ou annulent l’arrêt de l’ordinateur ne seront pas automatiquement arrêtées à l’arrêt de l’ordinateur.
Si vous désactivez ce paramètre ou ne le configurez pas, ces applications sont automatiquement arrêtées à l’arrêt de l’ordinateur, contribuant ainsi à garantir que Windows s’arrête plus rapidement et sans incident.
This policy setting specifies whether Windows will allow console applications and GUI applications without visible top-level windows to block or cancel shutdown. By default, such applications are automatically terminated if they attempt to cancel shutdown or block it indefinitely.
If you enable this setting, console applications or GUI applications without visible top-level windows that block or cancel shutdown will not be automatically terminated during shutdown.
If you disable or do not configure this setting, these applications will be automatically terminated during shutdown, helping to ensure that Windows can shut down faster and more smoothly.
Registre
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System- Nom de la valeur
AllowBlockingAppsAtShutdown
| État | Valeur écrite |
|---|---|
| Activé | REG_DWORD = 1 |
| Désactivé | REG_DWORD = 0 |
PowerShell
Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.
Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.
Activer
# Activer : Winsrv/AllowBlockingAppsAtShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowBlockingAppsAtShutdown' -Value 1 -Type DWordDésactiver
# Désactiver : Winsrv/AllowBlockingAppsAtShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'AllowBlockingAppsAtShutdown' -Value 0 -Type DWordRevenir à « Non configuré »
# Revenir à « Non configuré » : Winsrv/AllowBlockingAppsAtShutdown
$k = 'HKLM:\Software\Policies\Microsoft\Windows\System'
Remove-ItemProperty -Path $k -Name 'AllowBlockingAppsAtShutdown' -ErrorAction SilentlyContinue