Registering an exe as a service.
-
Hi all, Can somebody help me/point me on how to register an exe as a service. I googled for it but it lead to confusion more than any help. My exe would require a command line argument to start. So I can put it in a batch file and would like to register the batch file as a service. Thanks --Raghu
-
Hi all, Can somebody help me/point me on how to register an exe as a service. I googled for it but it lead to confusion more than any help. My exe would require a command line argument to start. So I can put it in a batch file and would like to register the batch file as a service. Thanks --Raghu
I seriously do not recommend doing this, but you can use SrvAny[^] to run an .EXE as a service.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I seriously do not recommend doing this, but you can use SrvAny[^] to run an .EXE as a service.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Ditto. What is so hard about using InstallUtil? If you need an installer, use this KBA: http://support.microsoft.com/kb/816169
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
Ditto. What is so hard about using InstallUtil? If you need an installer, use this KBA: http://support.microsoft.com/kb/816169
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
Hi Let me explain. :) I have an application built on VC++ 2005 (myApp.exe). I want to install it as a windows service. My application requires a an argument to start. How I do that. As I am new to this, I created a service with notepad.exe as the executable, but when I try to start it, this is what I got
Error 1053: The service did not respond to the start or control request in a timely fashion
I have the .net 2.0 framework installed. Only straight answers please. The one like .. >>Ditto. What is so hard about using InstallUtil? If you need an installer, use this KBA: by Jon_Boy is of no help, unless you are half bald ( or may be completely bald, you need to get bald to get the solution from Jon_Boy) Thanks --Raghu
modified on Wednesday, May 27, 2009 6:43 AM
-
I seriously do not recommend doing this, but you can use SrvAny[^] to run an .EXE as a service.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
srvany helps, but it do not result is a pure service. I found another tool for the same, lot better than srvany. http://sw4me.com/wiki/Winserv[^]
Raghuveer D wrote:
srvany helps, but it do not result is a pure service.
Of course it doesn't! If the code is not written AS A SERVICE application, then it's NEVER going to be a "pure service", even if you use WinServ.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Hi Let me explain. :) I have an application built on VC++ 2005 (myApp.exe). I want to install it as a windows service. My application requires a an argument to start. How I do that. As I am new to this, I created a service with notepad.exe as the executable, but when I try to start it, this is what I got
Error 1053: The service did not respond to the start or control request in a timely fashion
I have the .net 2.0 framework installed. Only straight answers please. The one like .. >>Ditto. What is so hard about using InstallUtil? If you need an installer, use this KBA: by Jon_Boy is of no help, unless you are half bald ( or may be completely bald, you need to get bald to get the solution from Jon_Boy) Thanks --Raghu
modified on Wednesday, May 27, 2009 6:43 AM
Raghuveer D wrote:
unless you are half bald ( or may be completely bald, you need to get bald to get the solution from Jon_Boy)
And that means what?? Bald people don't know what they're doing?? You're getting the error message because the ServiceManager is expecting a response to a Start command that it is not getting back. Why? Because your code is not written as a "pure service". Rewrite your application as a service and you won't have any of these problems. That is, if your not half-bald and really know how to write a proper service app...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Raghuveer D wrote:
unless you are half bald ( or may be completely bald, you need to get bald to get the solution from Jon_Boy)
And that means what?? Bald people don't know what they're doing?? You're getting the error message because the ServiceManager is expecting a response to a Start command that it is not getting back. Why? Because your code is not written as a "pure service". Rewrite your application as a service and you won't have any of these problems. That is, if your not half-bald and really know how to write a proper service app...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Raghuveer D wrote:
srvany helps, but it do not result is a pure service.
Of course it doesn't! If the code is not written AS A SERVICE application, then it's NEVER going to be a "pure service", even if you use WinServ.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Yes, Dave, thanks for you reply. I have a question here. Is it lot of pain to convert my application to be re-written as a service. Thanks
Probably.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008