Open in the explorer

Run logon scripts synchronously

Exécuter les scripts d’ouverture de session simultanément

Type
User
GPO path
User Configuration › Policies › Administrative Templates › System › Scripts FR: Configuration utilisateur › Stratégies › Modèles d'administration › Système › Scripts
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
Scripts.admx
Internal name
Scripts/Run_Logon_Script_Sync_1

Explanation

This policy setting directs the system to wait for logon scripts to finish running before it starts the File Explorer interface program and creates the desktop.

If you enable this policy setting, File Explorer does not start until the logon scripts have finished running. This policy setting ensures that logon script processing is complete before the user starts working, but it can delay the appearance of the desktop.

If you disable or do not configure this policy setting, the logon scripts and File Explorer are not synchronized and can run simultaneously.

This policy setting appears in the Computer Configuration and User Configuration folders. The policy setting set in Computer Configuration takes precedence over the policy setting set in User Configuration.

French text from Windows 11 26H2

Ce paramètre de stratégie indique au système qu’il doit attendre la fin de l’exécution des scripts d’ouverture de session avant de démarrer l’interface de l’Explorateur de fichiers et de créer le Bureau.

Si vous activez ce paramètre de stratégie, l’Explorateur de fichiers ne démarre pas tant que l’exécution des scripts d’ouverture de session n’est pas terminée. Ce paramètre de stratégie permet de s’assurer que le traitement des scripts d’ouverture de session est terminé avant que l’utilisateur ne commence à travailler, mais il peut retarder l’apparition du Bureau.

Si vous désactivez ou ne configurez pas ce paramètre, les scripts d’ouverture de session et l’Explorateur de fichiers ne sont pas synchronisés et peuvent s’exécuter simultanément.

Ce paramètre de stratégie apparaît dans les dossiers Configuration ordinateur et Configuration utilisateur. Le paramètre de stratégie défini dans Configuration ordinateur prévaut sur celui qui est défini dans Configuration utilisateur.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
Value name
RunLogonScriptSync
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

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: Scripts/Run_Logon_Script_Sync_1
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'RunLogonScriptSync' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: Scripts/Run_Logon_Script_Sync_1
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
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 'RunLogonScriptSync' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": Scripts/Run_Logon_Script_Sync_1
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\System'
Remove-ItemProperty -Path $k -Name 'RunLogonScriptSync' -ErrorAction SilentlyContinue

Availability