S
S
shell_guy2022-01-13 12:47:06
Python
shell_guy, 2022-01-13 12:47:06

How to make a script a service?

How to make a script a windows service so that it automatically restarts when it crashes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2022-01-13
@Lopar

sc.exe create <new_service_name> binPath= "<path_to_the_service_executable>"

The quotes and space after binPath= are required.

P
pfg21, 2022-01-13
@pfg21

screw services should have additional holes for management.
You can't run an arbitrary program without a wrapper.
use for example Non-Sucking Service Manager

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question