Configurer le comportement de récupération des fichiers MSI endommagés
Configure MSI Corrupted File Recovery behavior
Explication
Vous pouvez configurer le comportement de récupération des fichiers MSI endommagés en attribuant l’un des trois états possibles à ce paramètre de stratégie :
Demande de résolution : la détection, la résolution des problèmes et la récupération des applications MSI endommagées sont activées. Windows affiche une boîte de dialogue lorsque la réinstallation de l’application est nécessaire. Il s’agit du comportement de récupération par défaut sur le client Windows.
Silencieux : la détection, la résolution des problèmes et la notification des applications MSI à réinstaller s’effectuent sans interface utilisateur. Windows consigne dans un journal les événements de détection des altérations et indique l’application qui doit être réinstallée. Ce comportement est recommandé pour un fonctionnement sans périphérique de contrôle.
Dépannage seulement : la détection et la vérification des fichiers endommagés s’effectuent sans interface utilisateur. Aucune tentative de récupération n’est effectuée.
Si vous activez ce paramètre de stratégie, le comportement de récupération des fichiers endommagés prend la valeur Demande de résolution (valeur par défaut sur le client Windows), Silencieux (valeur par défaut sur le serveur Windows) ou Dépannage seulement.
Si vous désactivez ce paramètre de stratégie, la résolution des problèmes et la récupération des fichiers endommagés sont désactivés. Aucune tentative de résolution des problèmes n’est effectuée.
Si vous ne configurez pas ce paramètre de stratégie, le comportement de récupération des fichiers endommagés prend la valeur de récupération par défaut.
Aucun redémarrage du système ou d’un service n’est nécessaire pour l’application immédiate des modifications apportées à ce paramètre de stratégie après une actualisation de la stratégie de groupe.
Remarque : ce paramètre de stratégie ne s’applique que si le service de stratégie de diagnostic est en cours d’exécution. Lorsque ce service est arrêté ou désactivé, aucune tentative de récupération de fichiers système n’est effectuée. Le service de stratégie de diagnostic peut être configuré avec le composant logiciel enfichable Services dans la console MMC (Microsoft Management Console).
This policy setting allows you to configure the recovery behavior for corrupted MSI files to one of three states:
Prompt for Resolution: Detection, troubleshooting, and recovery of corrupted MSI applications will be turned on. Windows will prompt the user with a dialog box when application reinstallation is required. This is the default recovery behavior on Windows client.
Silent: Detection, troubleshooting, and notification of MSI application to reinstall will occur with no UI. Windows will log an event when corruption is determined and will suggest the application that should be re-installed. This behavior is recommended for headless operation and is the default recovery behavior on Windows server.
Troubleshooting Only: Detection and verification of file corruption will be performed without UI. Recovery is not attempted.
If you enable this policy setting, the recovery behavior for corrupted files is set to either the Prompt For Resolution (default on Windows client), Silent (default on Windows server), or Troubleshooting Only.
If you disable this policy setting, the troubleshooting and recovery behavior for corrupted files will be disabled. No troubleshooting or resolution will be attempted.
If you do not configure this policy setting, the recovery behavior for corrupted files will be set to the default recovery behavior.
No system or service restarts are required for changes to this policy setting to take immediate effect after a Group Policy refresh.
Note: This policy setting will take effect only when the Diagnostic Policy Service (DPS) is in the running state. When the service is stopped or disabled, system file recovery will not be attempted. The DPS can be configured with the Services snap-in to the Microsoft Management Console.
Registre
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{54077489-683b-4762-86c8-02cf87a33423}- Nom de la valeur
ScenarioExecutionEnabled
| É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 : Msi-FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{54077489-683b-4762-86c8-02cf87a33423}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 1 -Type DWord
# Niveau d’exécution des scénarios
# Options possibles :
# Troubleshooting Only = 1
# Prompt for Resolution = 2
# Silent = 3
Set-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -Value 2 -Type DWordDésactiver
# Désactiver : Msi-FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{54077489-683b-4762-86c8-02cf87a33423}'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -Value 0 -Type DWordRevenir à « Non configuré »
# Revenir à « Non configuré » : Msi-FileRecovery/WdiScenarioExecutionPolicy
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WDI\{54077489-683b-4762-86c8-02cf87a33423}'
Remove-ItemProperty -Path $k -Name 'ScenarioExecutionEnabled' -ErrorAction SilentlyContinue
Remove-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -ErrorAction SilentlyContinueOptions (1)
| Libellé | Contrôle | Valeur de registre | Type REG | Contraintes / détails | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Niveau d’exécution des scénariosScenario Execution LevelWdiScenarioExecutionPolicyLevel | Liste déroulanteenum | EnabledScenarioExecutionLevel | REG_DWORD | Obligatoire · Choix par défaut (interface) : n° 1
|