472,131 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

windows service - installutil.exe

when i run my program, an error message prompt me that i should add the
installutil.exe. How do i checked for the installutil.exe? How can i add
it to my Timer program?

----------------------------------------------
when you fear to fail, you fear something that
has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
7 34268
What you should actually add is an installer class for registering the
service within the system. I believe MSDN has pretty detailed documentation
on how to deploy Windows services with custom actions (namely, installer
classes launched by the Windows Installer) so you should start from getting
acquainted with this info. I might sound not very friendly, but this is not
because I don't want to help you, it's just MSDN writers explained the
things much better than I'd do.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"scarred wind" <sc*********@yahoo.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
when i run my program, an error message prompt me that i should add the
installutil.exe. How do i checked for the installutil.exe? How can i add
it to my Timer program?

----------------------------------------------
when you fear to fail, you fear something that
has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #2
i'll check it out soon. thanks!

----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
You can manually install the service - it's pretty easy.

If you have the VS.NET command prompt, just type installutill <service>,
where <service> is the complete path to the executable file in your bin
directory. This will install the service for you, where you can control it
from the services manager under Administrative tools in your control panel.
To uninstall the service, just type installutil -u <service>.

If you do not have a VS.NET command prompt, it's no big deal, you just have
to specify the full path for the installutil program, which is I think by
default under <your windows dir>\Microsoft.Net\framework\<framework version
dir\installutil.exe.

I hope this helps!

"scarred wind" <sc*********@yahoo.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
when i run my program, an error message prompt me that i should add the
installutil.exe. How do i checked for the installutil.exe? How can i add
it to my Timer program?

----------------------------------------------
when you fear to fail, you fear something that
has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #4
Thank you very much to those who have helped me.

My Error Prompt:

Window Service Start Failure:
Cannot start service from the command line or debugger. A Windows
Service must first be installed (using installutil.exe) and then started
with the ServerExplorer, Windows Service Administrative tool or the NET
START command.

I still can't figure it out, I hope you can be patient with me, I'm
quite new to C#. I thank you very much for helping me get around this
thing.

----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
Services are a little bit different from regular executables. In order to
run a service, it first need to be registered within the system, as it will
be started not by launching the .exe file, but by means of Service Control
Manager - a part of Windows managing all services. There's a kind of
protocol (namely, a sequence of SCM calls to your service) being executed
when a service starts.

To register the service with SCM, you need to add an installer class for the
service. To the best of my knowledge, there is a prepackaged installer class
in the framework designed just to register services within the system (and
this is documented in MSDN). This installer class will be invoked by the
installutil.exe utility to perform the registration. Now, that the service
is known to the Service Control Manager, it can be started by the ways
described in the error message you are getting.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"scarred wind" <sc*********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thank you very much to those who have helped me.

My Error Prompt:

Window Service Start Failure:
Cannot start service from the command line or debugger. A Windows
Service must first be installed (using installutil.exe) and then started
with the ServerExplorer, Windows Service Administrative tool or the NET
START command.

I still can't figure it out, I hope you can be patient with me, I'm
quite new to C#. I thank you very much for helping me get around this
thing.

----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 16 '05 #6
thank you again to all of you...

would it be possible for any of you to give me sample code, so that i
can refer to it?

thanks again.

----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #7
thank you all, very very much! i think i've solved the that error now.
But my installation is unsuccessful, and a Rollback is performed. What
could have caused it to install unsuccessfully?

Thank you,

-----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Mark | last post: by
5 posts views Thread by Jacobus Terhorst | last post: by
7 posts views Thread by Larry Bird | last post: by
4 posts views Thread by SQLScott | last post: by
4 posts views Thread by tshad | last post: by
5 posts views Thread by S Moran | last post: by
5 posts views Thread by dm3281 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.