Create a service program of your own:
Service Application, new (option), File, new, and so on, Delphi automatically generates the framework for the service program.
Save the appropriate project name. (Here the unit is named Unitserver.pas, the project is named PROJECTSERVER.DPR)
In the new service, you will find the DisplayName, name and other attributes;
DisplayName: The name displayed in the service; (Service Name: Delphi Service Demo program)
Name: Names of service runs; (Service program name: Delphiservice)
Here are the two concepts of service and service procedures. The service can start, stop, delete, itself can not install and uninstall, the service program needs to install and uninstall;
Net start is to start the service program.
The following is a DOS command to install the service EXE file: (DOS is not case-sensitive)
CD D:\delphi (for Project root), cmd, Win + R
Projectserver.exe/install//Installation prompts to install success
net start Delphiservice//Start service
Here you will see the service that just started in the win + R-services.msc Service
After the service starts, the program is not operational, you want to operate only to stop and uninstall
net stop Delphiservice//stop service
Projectserver.exe/uninstall//Uninstall
Although there is no code, but you can create a blank service program.
Delphi Create a service program