Introduction - If you have any usage issues, please Google them yourself
example demonstrates how to use code to achieve an executable registered as a service to the system. The development process is because I firewall after login at boot after launch, sometimes I boot will not logged in a very long time, when the machine is not under the protection of the firewall. Firewall as a system service after registration to solve the problem. This example can be used directly or by reference to code.