Create a Windows service
Http://jingyan.baidu.com/article/fa4125acb71a8628ac709226.html
Installation Services
Use Framwork framework comes with InstallUtil.exe tool installation Services
General use of command-line installation Services, fast speed
InstallUtil Location:C:\Windows\Microsoft.NET\Framework\
Different versions are located in different directories,framework2.0 in the v2.0.50727 directory
Way One:
Run cmd input as Administrator
C:\Windows\Microsoft.NET\Framework\v4.0.30319 . InstallUtil.exe E:\TestApp\Winform\WinServiceTest\WinServiceTest\bin\Debug\WinServiceTest.exe Enter to install the service
Way two:
DAT files:
%~dp0installutil.exe%~dp0windowsserviceforwcfdemo.exe
Pause
command-line learning:CD into the directory CD. Exit directory Pause Pause%~dp0 current directory start
W indows Script bat file
Uninstall
Way One:
Dat file deletion:
%~dp0installutil.exe/uninstall%~dp0windowsserviceforwcfdemo.exe
Pause
Way two:
run cmd as Administrator , enter the SC Delete service name
Service name of the service in the resource manager is ServiceName description is DisplayName
in the service is the service name is DisplayName description is Describename
Open Service:net start Xxt_service
Close service:net stop Xxt_service
Right-click in Design view, select "Add Installer", new ServiceProcessInstaller1 and serviceInstaller1 two components.
The ServiceProcessInstaller1 property is set as follows:
Account:localsystem indicates that all users can use the service.
The ServiceInstaller1 property is set as follows:
Description: School News analog phone Timing detection service represents the service description that will appear in Windows Service Manager.
Displayname:xxt_service represents the name of the service that will be displayed in Windows Service Manager.
Use
Http://www.cnblogs.com/jiewei915/archive/2010/12/14/1905395.html
Install two services at a time
Installation, uninstallation of Windows services