When it is written
The Service Control Manager writes 7045 to the System log when a new service or driver is installed, on the computer that gets it. The event gives the service name, the program the Service Control Manager runs to start it, the service type, the start type and the account it runs as. It is the event Microsoft's troubleshooting guidance uses to spot driver and software installations, and the one Microsoft Defender for Identity's suspicious service creation alert relies on.
Nothing has to be turned on: the System log is on by default and the event needs no audit policy. In exchange it carries less than its Security log twin, event 4697: the event data does not say which account installed the service. Event Viewer shows a User for the event, taken from the event's System section; Microsoft does not document what it holds for 7045, so use 4697 (Audit Security System Extension) to know who installed a service and from which logon session.
How to turn it on
Service Control Manager writes the event to the System log (Event Viewer > Windows Logs > System), which is on by default. Microsoft
Fields
In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.
| Field | What it holds | Since |
|---|---|---|
Service NameServiceName | Name of the new service, as given at installation. Compare it, together with the program path, with the services expected on the computer. | v0 |
Service File NameImagePath | Program the Service Control Manager runs to start the service, with its arguments, as given at installation (shown as Service File Name). It can be a quoted path, contain environment variables such as %SystemRoot%, or for a driver a path such as \SystemRoot\System32\drivers\.... | v0 |
Service TypeServiceType | Type of service, as text in the computer's display language: user mode service for a Win32 service and kernel mode driver for a driver on an English system. Not the hexadecimal code of event 4697. | v0 |
Service Start TypeStartType | When the service starts, as text in the computer's display language: auto start, demand start, boot start, system start or disabled on an English system. Not the number of event 4697. | v0 |
Service AccountAccountName | Account the service will run as (Service Account), such as LocalSystem. Empty for drivers, which have no service account. | v0 |
Values to know
Service Type ServiceType
| Value | Meaning | Signal |
|---|---|---|
user mode service | A Win32 service, in its own process or sharing oneThe usual type, as in Microsoft's example. Written in the computer's display language. | Expected |
kernel mode driver | A driverStarts early with almost unlimited access to the system. Microsoft recommends reporting every driver installation in event 4697; outside planned driver updates they are rare. | Attack signal |
Service Start Type StartType
| Value | Meaning | Signal |
|---|---|---|
auto start | Starts with the systemThe usual start type, as in Microsoft's example. | Expected |
demand start | Manual startStarts only when something asks for it. | Worth knowing |
boot start or system start | Started by the loader or during system initializationUsed only by drivers. Microsoft recommends reporting them in event 4697. | Attack signal |
disabled | Cannot be startedMicrosoft notes for event 4697 that installing a service disabled is not common. | Worth knowing |
Service Account AccountName
| Value | Meaning | Signal |
|---|---|---|
LocalSystem | The Local System accountThe default when the installer gives no account, as in Microsoft's example. | Expected |
Empty | A driverDrivers have no service account. | Worth knowing |
A user account | The service runs as a domain or local userMicrosoft recommends reporting every service account other than LocalSystem, LocalService and NetworkService (event 4697). | Worth knowing |
Service File Name ImagePath
| Value | Meaning | Signal |
|---|---|---|
Under %windir% or Program Files | Where installed software normally lives | Expected |
Anywhere else, such as a temporary, user or share folder | A program outside the usual foldersMicrosoft recommends watching for every service program outside the Windows and Program Files folders (event 4697). | Attack signal |
Volume and noise
Most events come from software and driver installation: Windows components and drivers, security and backup agents, monitoring and management software, and updates that install a service again. Microsoft's troubleshooting guidance reads the same events to find a driver update before a crash. Remote administration tools that create a temporary service on the target each time they run a command add events too.
On a domain controller, new services should be rare and planned. Microsoft's guidance for the Security log twin 4697 is that new services on high value computers should be planned, and that an unexpected one should raise an alert.
Keeping it manageable
- Collect 7045 from every domain controller and apply the rule to those logs only: it matches the event ID and the
Service Control Managerprovider and cannot tell a domain controller from a workstation. - Allow-list the services expected on your domain controllers by
ServiceNameandImagePathtogether, not by name alone, so that a known name pointing to a new program still stands out. - Rank what remains with the checks Microsoft recommends for event 4697: drivers, boot or system start, a program outside
%windir%and the Program Files folders, and a service account other than LocalSystem, LocalService or NetworkService. - Do not match the English words of
ServiceTypeandStartTypein rules: Windows writes them in the computer's display language. Match onImagePath,AccountNameandServiceName, or compare the type and start values with the strings your own computers write. - Collect 4697 next to 7045 on domain controllers: it names the installing account and its logon session, which tells an administrator's planned installation from remote execution.
Sample event
Version 0, with made-up values.
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="16384">7045</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
<EventRecordID>1048576</EventRecordID>
<Correlation />
<Execution ProcessID="712" ThreadID="2408" />
<Channel>System</Channel>
<Computer>DC01.corp.example.com</Computer>
<Security />
</System>
<EventData>
<Data Name="ServiceName">ExampleBackupAgent</Data>
<Data Name="ImagePath">"C:\Program Files\Example\BackupAgent\agent.exe" --service</Data>
<Data Name="ServiceType">user mode service</Data>
<Data Name="StartType">auto start</Data>
<Data Name="AccountName">LocalSystem</Data>
</EventData>
</Event>Attacks this event reveals
Detection rules that read this event:
Frequently asked questions
What is the difference between event 7045 and event 4697?
Both record a new service with its name, program, type, start type and account. 7045 is written to the System log by the Service Control Manager on every computer without any audit policy, and writes the type and start type as words. 4697 is a Security log event that needs Audit Security System Extension, writes them as codes, and names the account that installed the service with its logon session.
Does event 7045 show who installed the service?
Not in its event data. Event Viewer shows a User for the event, taken from the event's System section, but Microsoft does not document what it holds for 7045. To know the installing account and where it logged on from, use event 4697 and join it to the logon event 4624. Microsoft notes that the address in 4624 is what the authenticating service passed to Windows, so some logons carry none.
Why are the service type and start type of event 7045 not in English?
The Service Control Manager writes them as text in the display language of the computer, so a computer set to another language writes translated words where an English one writes user mode service or auto start. Rules that match those words miss events from other languages; match on the program path, the account and the service name instead.
Which 7045 events on a domain controller deserve attention?
Any service that is not on your list of expected services, and first those that install a driver, run a program outside the Windows and Program Files folders, start at boot or system start, or run as a user account. Microsoft recommends the same checks for event 4697 and treats an unexpected service on a high value computer as a reason for an alert.
References
- Troubleshoot unexpected reboots using system event logs, event 7045 (Microsoft)
- Microsoft Defender for Identity classic alerts: Suspicious service creation (Microsoft)
- 4697(S): A service was installed in the system (Microsoft)
- 4624(S): An account was successfully logged on (Microsoft)
- CreateServiceW function, service types and start types (Microsoft)