I have packaged a .exe file which when executed will execute a .bat file. I need to install this .exe file as a Windows service.
I have used Sc and InstallUtil.exe to do this.
I used SC and installed this .exe file as windows service, But When i try to start the service it throws me Error 1053: Service did not respond to start in timely fashion.
When i tried to install using installutil.exe, I am unable to install, it throws error
C:\Windows\Microsoft.NET\Framework64\v2.0.50727>InstallUtil.exe c:\Meiyappan\code-apr2\datadirector\bin\agent.exe Microsoft (R) .NET Framework Installation utility Version 2.0.50727.5420 Copyright (c) Microsoft Corporation. All rights reserved.
Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file:///c:\Meiyappan\code-apr2\datadirector\bin\agent.e xe' or one of its dependencies. The module was expected to contain an assembly manifest..
I could find some other alternatives like Firedeamon pro and srvany.exe, But my concern is would it be a generic across all machine.
I would like to find a generic solution for this. Any help would be greatly appreciated.