Run startup scripts asynchronously
Exécuter les scripts de démarrage de manière asynchrone
Explanation
This policy setting lets the system run startup scripts simultaneously.
Startup scripts are batch files that run before the user is invited to log on. By default, the system waits for each startup script to complete before it runs the next startup script.
If you enable this policy setting, the system does not coordinate the running of startup scripts. As a result, startup scripts can run simultaneously.
If you disable or do not configure this policy setting, a startup cannot run until the previous script is complete.
Note: Starting with Windows Vista operating system, scripts that are configured to run asynchronously are no longer visible on startup, whether the ""Run startup scripts visible"" policy setting is enabled or not.
Ce paramètre de stratégie permet au système d’exécuter les scripts de démarrage simultanément.
Les scripts de démarrage sont des fichiers de commandes qui sont exécutés avant que l’utilisateur ne soit invité à ouvrir une session. Par défaut, le système attend que chaque script de démarrage soit terminé avant d’exécuter le suivant.
Si vous activez ce paramètre de stratégie, le système ne coordonne pas l’exécution des scripts de démarrage. En conséquence, ces scripts peuvent être exécutés simultanément.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, un script de démarrage ne peut pas s’exécuter avant la fin du script précédent.
Remarque : avec l’arrivée du système d’exploitation Windows Vista, les scripts configurés pour s’exécuter de manière asynchrone ne sont plus visibles au démarrage, que le paramètre de stratégie « Exécuter les scripts de démarrage en mode visible » soit activé ou non.
Registry
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System- Value name
RunStartupScriptSync
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 0 |
| Disabled | REG_DWORD = 1 |
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: Scripts/Run_Startup_Script_Sync
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RunStartupScriptSync' -Value 0 -Type DWordDisable
# Disable: Scripts/Run_Startup_Script_Sync
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'RunStartupScriptSync' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Scripts/Run_Startup_Script_Sync
$k = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'RunStartupScriptSync' -ErrorAction SilentlyContinue