Configure MSI Corrupted File Recovery behavior
Configurer le comportement de récupération des fichiers MSI endommagés
Explanation
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.
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).
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WDI\{54077489-683b-4762-86c8-02cf87a33423}- Value name
ScenarioExecutionEnabled
| 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: 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
# Scenario Execution Level
# Possible options:
# Troubleshooting Only = 1
# Prompt for Resolution = 2
# Silent = 3
Set-ItemProperty -Path $k -Name 'EnabledScenarioExecutionLevel' -Value 2 -Type DWordDisable
# Disable: 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 DWordRevert to "Not configured"
# Revert to "Not configured": 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)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Scenario Execution LevelNiveau d’exécution des scénariosWdiScenarioExecutionPolicyLevel | Drop-down listenum | EnabledScenarioExecutionLevel | REG_DWORD | Required · Default choice (UI): #1
|