Update service template to use full path to bundled winpython and change arguments to run octoprint as module.
<service>
<!-- ID of the service. It should be unique across the Windows system-->
<id>OctoPrint5000</id>
<!-- Display name of the service -->
<name>OctoPrint on Port 5000</name>
<!-- Service description -->
<description>Service wrapper for OctoPrint (powered by WinSW).</description>
<!-- Path to the executable, which should be started -->
<executable>C:\OctoPrint1.8.2\WPy64-31040\python-3.10.4.amd64\python.exe</executable>
<arguments>-m octoprint serve --basedir=C:\OctoPrint1.8.2\basedir\5000 --port 5000</arguments>
<onfailure action="restart" delay="10 sec"/>
<interactive/>
</service>
Update service template to use full path to bundled winpython and change arguments to run octoprint as module.