M
Mika M
I'm doing Windows Service programming using C# 2005. My solution
contains Windows Service project. Then I added Setup and Deployment
project into the same solution. Both service- and Setup and Deployment
project are working fine. After running setup, it made files into the
C:\Program Files\MyCompany\MyService, but how can I install service into
the services and start this service using only Setup and Deployment project?
Now I can do this using install.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /i MyService.exe
NET START MyService
....and uninstall it using ininstall.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /u MyService.exe
Or am I doing this correct way at all? What is the correct way to
install this kind of service easily?
contains Windows Service project. Then I added Setup and Deployment
project into the same solution. Both service- and Setup and Deployment
project are working fine. After running setup, it made files into the
C:\Program Files\MyCompany\MyService, but how can I install service into
the services and start this service using only Setup and Deployment project?
Now I can do this using install.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /i MyService.exe
NET START MyService
....and uninstall it using ininstall.bat-file containing...
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\installutil /u MyService.exe
Or am I doing this correct way at all? What is the correct way to
install this kind of service easily?