1, production background running program
First, create a bat script, App.bat, to write the Run command, such as: node App.js >log.log
Then download a tool Bat_to_exe_converterto convert bat to exe, convert bat to EXE, as follows
After generating exe file, mouse click Start App.exe, open Task Manager, there will be App.exe process, indicating success. Such as:
2, the production of automatic start-up service
The power-on-boot principle is to register the EXE file with the boot service entry via the command.
SC create creates a Windows system service
Describes the SC is a command-line program for communicating with the Service Control Manager and the service.
command line, it is important to note that there is a space between the equals sign and the value, otherwise it will be an error. Such as:
Windows Home-made background running process, exe start-up service