ADS

Featured

How do I create a program as a Service on Windows NT?

Sometimes we need to create a service to keep a desired program running. This tutorial explains how quickly you create a service on windows.

So in this way, you quickly create your program as a service, for example, we use the Windows calculator:


sc create yousrvnamehere binPath = "c: \ windows \ system32 \ calc.exe"


Note: Do not forget the space between binPath and the path, as it will only understand that there is something after the space. (A strange bug created by Microsoft in sc.exe, possibly to make it difficult for users to create programs as a service)

So you create a service for the next program. By default, when adding the service without adding any more arguments, it remains disabled by default, so go to "services.msc" through the start run and look for "yousrvnamehere" in the listing and double click, and click start.

Depending on the program, errors can occur, since it is running as SYSTEM, which is the main account of the system, and has some limitations for programs with a graphical interface or some component. This is because the program runs on top of another program, svchost.exe, which takes care of the task of passing the correct treads to secure service processing.

No comments