How can we detect if a windows service is deleted,is there an event log id for it?
Sorry, it would seem Service deletions are not logged in the same way as creations.
I ran:
sc create DummySvc binPath="C:\Windows\System32\Notepad.exe"
sc delete DummySvc
The System Event Log recorded Event ID 7045 on creation:
A service was installed in the system.
Service Name: DummySvc
Service File Name: C:\Windows\System32\Notepad.exe
Service Type: user mode service
Service Start Type: demand start
Service Account: LocalSystem
But no similar events were recorded there on deletion.