2

i am new to windows services. please help me to know is Project installer Mandatory for Windows service or why do we need project installer. can we create and install windows service into system without project installer.

thanks,

Praba
  • 31
  • 9

2 Answers2

3

If you're talking about the ProjectInstaller.cs file that's added to your service project if you're looking at the Service and choose "Add Installer...", then yes, it's required.

It creates two components - a ServiceProcessInstaller and a ServiceInstaller. Together, these components contain important information that is required to install a service - such as what account the service should run under (such as Local System, Local Service, Network Service or an actual user account), metadata about the service, and information about how the service should be started.

I think that DinosaurTom's answer was assuming you were talking about an installer project, a separate project in the solution that would create a setup/MSI file. It is exactly the two above mentioned components that tools such as InstallUtil or a Setup Project actually interact with to perform installation.

Community
  • 1
  • 1
Damien_The_Unbeliever
  • 234,701
  • 27
  • 340
  • 448
  • Thanks Damien My doubt is on ProjectInstaller.cs only. suppose if i am not adding this file while creating windows service. after installation, do my service works properly. – Praba Nov 18 '15 at 08:48
2

No, it is not mandatory. However it could be useful when installing on many maschines.

We can create a Windows Service without Project Installer. For example, like in this post Install a Windows Service using a Windows Command Prompt

Community
  • 1
  • 1
DinosaurTom
  • 212
  • 4
  • 15
  • Thank you DisosaurTom, please correct me if am wrong.1. if the service has PorjectInstaller.cs file then after installing the service. it will be automatically added in the serivces.msc list. 2. if the service doesn't have the PorjectInstaller.cs then i have to use Installtutil.exe to make this service added in the serivces.msc pool. – Praba Nov 18 '15 at 08:57
  • 1
    1. If the installation went correct then it will be added to services.msc 2. Do not mix things up. ProjectInstaller.cs is required as Damien mentioned. – DinosaurTom Nov 18 '15 at 09:05
  • 1
    thanks DinosaurTom, was confused now i am clear now. – Praba Nov 19 '15 at 09:28