3

I have built a window application which i am trying to turn into service. I am easily able to install it but when i try to run that service , it shows:

Windows could not start the service on local computer error 1067. The process terminated unexpectedly.

In the event view property logs , error with event id 7034 is seen but no error description. Already searched a lot for solution but no success.

Prannoy Mittal
  • 1,525
  • 5
  • 21
  • 32
  • Error 1067 is `ERROR_PROCESS_ABORTED`, which means *The process terminated unexpectedly*. With absolutely no useful information, it's highly unlikely we'll be able to help. Use the debugger. or do some logging to a text file or the debug window to try and see what's happening. – Ken White Mar 09 '15 at 13:24
  • Visual Studio allows to attach a procces for debugging only when service is running. I am not able to reach that stage. Is there any way i can print logs to event logs – Prannoy Mittal Mar 10 '15 at 09:41

2 Answers2

2

I also got same error some time back. This error has several reasons. One reason can be u are specifying some path to the file or location which the service is unable to read or write after it is installed.

Gaurav Tyagi
  • 958
  • 6
  • 10
  • I got this when I installed ISC Bind for Windows and tried to start it as Windows Service. This answer made me check etc directory under Bind installation directory. It was empty. When I populated with necessary files from another installation, the service started fine. – Prasad Bhimaraju Jul 03 '19 at 20:17
-1

This happens when the compilation target CPU differs from the server CPU type.

Ex. running x86 built service on x64 server,

Make sure you build the project with the correct target CPU or with AnyCPU.

Visual Studio -> Project properties -> Compile -> (Select configuration) -> Target CPU -> AnyCPU

Plamen Kasabov
  • 145
  • 1
  • 4