Hello!
The service class itself is really nothing more than a object that derives
from the ServiceBase class which contains necessary members needed for
services to start, stop, and other various functions.
The installer class you need to add to your project is (assuming you have
the RunInstaller attribute decorating the class and set to true) will cause
the installutil.exe to locate the installer and use it during the
installation process. This is where the ServiceInstaller and
ServiceProcessInstaller objects you had to add to your installer file come
into play.
Those files tell the installer what settings to use while the service is
being installed on the target machine. Which account the service needs to
run as, any description about the service, and other pieces of information.
Those objects are then used during the pinvoke calls (done within the
ServiceInstaller class) needed by the installer to actually perform the
installation. If you're curious about what's going on behind the scenes
during the install, simply use .NET Reflector on the
System.ServiceProcess.ServiceInstaller class located in the
System.ServiceProcess assembly.
Hopefully that answers your question. :o)
- Jeff
"vmantrana" <vm*******@gmail.comwrote in message
news:b0**********************************@x35g2000 hsb.googlegroups.com...
>
>Hi,
Short and simple answer, it auto generates new files. If you are looking
for ways to do this yourself, you need to extend visual studio in some
way.
This page might be a good starting point to learn about this.
[Resources about Visual Studio .NET
extensibility]http://www.mztools.com/resources_vsnet_addins.aspx
--
Happy Coding!
Morten Wennevik [C# MVP]
Thanks for the information. I think my question is actually centered
on how the service class and the ProjectInstaller class (which
contains the "ServiceProcessInstaller" and "ServiceInstaller") are
tied. This is probably a non-practical question...
Thanks.