473,403 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 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 34359
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vlad | last post by:
Is there any way to install multiple instances of the same windows service designed with VS.NET 2003? I tried copying the binaries into a separate folder and then copying registry entries for the...
7
by: sidd | last post by:
Hi All, i have some doubts on .net windows services.. please see if some one could help me understand this.. 1)is it possible to install a windows service which does not have a installer added...
2
by: Mark | last post by:
I created an extremely simple windows service that only writes to the EventLogs on Stop and Pause. I installed it using the InstallUtil.exe program, the output of which is below. It appears to be...
5
by: Jacobus Terhorst | last post by:
I created a simple windows service. However when I built it again a couple of days later I could no longer install the service. The InstallUtil.exe cannot UNINSTALL the service because "The...
7
by: Larry Bird | last post by:
I have a windows service that want to un-install. When I run "installutil /u serivcename" I get the error that the serivce is not installed on my machine. However, when view the serivce console I...
4
by: SQLScott | last post by:
My esteemed VB.Net gurus, I posted this question a week or so ago and recieved 1 response that helped me somewhat but really did not solve the problem (but I do appreciate the response). I...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
5
by: S Moran | last post by:
following this tutorial http://www.c-sharpcorner.com/UploadFile/mahesh/window_service11262005045007AM/window_service.aspx installutil seems to complete successfully, but the service is not...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.