Windows self-made background running process, exe boot self-start service
1. Create a background running program
First, create a bat script, app. bat, which is written into the running command, such as: node app. js> log. log
Download the Bat_To_Exe_Converter tool to convert bat to exe and convert bat to exe, as shown below:
After the exefile is generated, click the mouse to start app.exeand open the Task Manager. The app.exe process will appear, indicating that it is successful. For example:
2. Create an Automatic startup Service
The principle of Automatic startup upon startup is to register the exe file to the startup service item through commands.
SC Create creates a Windows system service
Description SC is a command line program used to communicate with the Service Control Manager and service.
Note that there must be spaces between equal signs and values in the command line. Otherwise, an error is reported. For example:
<Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20141215/20141215100401170.jpg" alt = "\">