Open in the explorer

Control the location of the log file

Contrôler l’emplacement du fichier journal

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Event Log Service › Application FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Service Journal des événements › Application
Supported on
At least Windows Vista FR: Au minimum Windows Vista
ADMX file
EventLog.admx
Internal name
EventLog/Channel_LogFilePath_1

Explanation

This policy setting controls the location of the log file. The location of the file must be writable by the Event Log service and should only be accessible to administrators.

If you enable this policy setting, the Event Log uses the path specified in this policy setting.

If you disable or do not configure this policy setting, the Event Log uses the folder %SYSTEMROOT%\System32\winevt\Logs.

French text from Windows 11 26H2

Ce paramètre de stratégie contrôle l’emplacement du fichier journal. L’emplacement du fichier doit pouvoir être écrit par le service Journal des événements et ne doit être accessible qu’aux administrateurs.

Si vous activez ce paramètre de stratégie, le journal des événements utilise le chemin d’accès spécifié dans ce paramètre de stratégie.

Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, le journal des événements utilise le dossier %SYSTEMROOT%\System32\winevt\Logs.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\EventLog\Application
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

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: EventLog/Channel_LogFilePath_1
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Log File Path
Set-ItemProperty -Path $k -Name 'File' -Value '<value>' -Type String

Disable

# Disable: EventLog/Channel_LogFilePath_1
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": EventLog/Channel_LogFilePath_1
$k = 'HKLM:\Software\Policies\Microsoft\Windows\EventLog\Application'
Remove-ItemProperty -Path $k -Name 'File' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Log File PathChemin d’accès du fichier journalChannel_LogFilePathText boxtextFileREG_SZ

Availability