Event ID 9707: Started execution of a Run or RunOnce command
Written by Explorer at logon when it launches a command from a Run or RunOnce registry key. Records the full command line as stored in the registry value.
- Channel
- Microsoft-Windows-Shell-Core/Operational
- Logged by default
- Yes
- Written on
- Any host
- Volume
- Low
- Provider
- Microsoft-Windows-Shell-Core
- Needs a SACL
- No
Key fields
Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.
| Field | What it tells you |
|---|---|
| Command | Command line Explorer is starting, as stored in the Run or RunOnce value. Paths under AppData, Temp, ProgramData or Users\Public, script hosts (wscript, mshta, powershell) and encoded arguments deserve a closer look |
Analyst notes
- 019707 is evidence that a Run or RunOnce entry was launched at logon, with its command line, even when the registry value has since been removed. RunOnce values are deleted as they run, so this event can be the only remaining record of them.
- 02The event's System section carries the SID of the user whose logon triggered it; pair it with Security 4624 (Logon Type 2, 10 or 11) for that user just before.
- 03It records what Explorer started, not what the program did. Use the PID in the matching 9708 to find the process in 4688 or Sysmon 1 (parent explorer.exe) and follow its activity.
- 049707 does not cover Startup folder items, services, scheduled tasks or Winlogon values. The provider traces Startup folder launches (9711) and Run commands started as a job (9709) in the Shell-Core Diagnostic channel instead, so a missing 9707 does not prove a Run value never ran.
Pull this event
Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.
Get-WinEvent -LogName 'Microsoft-Windows-Shell-Core/Operational' -FilterXPath "*[System[(EventID=9707)]]" -MaxEvents 50 |
Select-Object TimeCreated, Id, MachineName, Message-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.
ATT&CK mapping
Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.
Related events
Common questions
- What does Windows event ID 9707 mean?
- Written by Explorer at logon when it launches a command from a Run or RunOnce registry key. Records the full command line as stored in the registry value. It is written to the Shell-Core Operational log (Microsoft-Windows-Shell-Core/Operational).
- Is event 9707 logged by default?
- Yes, a default Windows installation records it.
- Where is event 9707 recorded?
- In the Microsoft-Windows-Shell-Core/Operational channel on the any host.
Decode a real event
Paste the XML and every value gets explained. Nothing leaves your browser.
Open decoderWritten by Explorer at logon when it launches a command from a Run or RunOnce registry key. Records the full command line as stored in the registry value. Key fields, logging requirements, ATT&CK mapping and ready-to-run queries.