Create a project for a Windows service
New Project->c++ Language->atl->atl Project-> Service (EXE)
This creates a Windows Service project.
The resulting solution contains two projects: Services, Servicesps. In fact, the main use of services,vs2012 is not clear why two projects were generated.
Registering Windows Services
When the Windows service is first started, it needs to be registered and registered in a way that can be done by command line or batch processing.
Services.exe-regserver
Uninstalling the Windows service
Now that the service needs to be registered, it needs to be unregistered, that is, the uninstall, as well as through the command line or batch process.
Services.exe–unregserver
Summarize
This completes the entire process of creating, compiling, installing, running, and uninstalling the entire Windows service.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/