关于批处理添加python小程序为win服务
sc create %task_name% binPath= "C:\Program Files\Python37\python.exe --C:\Users\eyouh\Desktop\%task_name%.py"
其中 --为为python.exe添加的参数,相当于python task_name.py
sc create %task_name% binPath= "C:\Program Files\Python37\python.exe --C:\Users\eyouh\Desktop\%task_name%.py"
其中 --为为python.exe添加的参数,相当于python task_name.py