SyntaxFix
Write A Post
Hire A Developer
Questions
Your code has nothing to do with the service installation, it is not the problem.
In order to test the service, you must install it as indicated.
For more information about installing your service : Installing and Uninstalling Services