I have created a service that executes a command in cmd.exe
Here is my code
protected override void OnStart(string[] args) { eventLog1.Write