This is not the actual "installer". This code is needed for the service to operate correctly. We will get to installing and deployment latter..
Add The Installer Code
From Service1 designer, right click in the gray area and choose Add Installer.
Another file will be added to your Solution Explorer, called ProjectInstaller. On this class will be two components in the designer, ServiceProccessInstaller1 and ServiceInstaller1.
Let's configure the Installer: Click on the listed component and alter the following properties:
- Account = LocalSystem (will cause service to run under local service account)
- ServiceName = NewService
- StartType = Automatic (wether your service will auto start after reboot)
- DisplayName = NewService
Well, that's it for today. We'll continue with next lesson in another time.