คำอธิบายทีละขั้นตอนวิธีทำให้มันใช้งานได้:
1- ขั้นแรกให้สร้างไฟล์ไพ ธ อนตามโครงกระดูกพื้นฐานที่กล่าวถึงข้างต้น และบันทึกลงในพา ธ ตัวอย่างเช่น: "c: \ PythonFiles \ AppServerSvc.py"
import win32serviceutil
import win32service
import win32event
import servicemanager
import socket
class AppServerSvc (win32serviceutil.ServiceFramework):
    _svc_name_ = "TestService"
    _svc_display_name_ = "Test Service"
    def __init__(self,args):
        win32serviceutil.ServiceFramework.__init__(self,args)
        self.hWaitStop = win32event.CreateEvent(None,0,0,None)
        socket.setdefaulttimeout(60)
    def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.hWaitStop)
    def SvcDoRun(self):
        servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
                          servicemanager.PYS_SERVICE_STARTED,
                          (self._svc_name_,''))
        self.main()
    def main(self):
        # Your business logic or call to any class should be here
        # this time it creates a text.txt and writes Test Service in a daily manner 
        f = open('C:\\test.txt', 'a')
        rc = None
        while rc != win32event.WAIT_OBJECT_0:
            f.write('Test Service  \n')
            f.flush()
            # block for 24*60*60 seconds and wait for a stop event
            # it is used for a one-day loop
            rc = win32event.WaitForSingleObject(self.hWaitStop, 24 * 60 * 60 * 1000)
        f.write('shut down \n')
        f.close()
if __name__ == '__main__':
    win32serviceutil.HandleCommandLine(AppServerSvc)
2 - ในขั้นตอนนี้เราควรลงทะเบียนบริการของเรา 
เรียกใช้พรอมต์คำสั่งในฐานะผู้ดูแลระบบและพิมพ์เป็น:
  sc สร้าง TestService binpath = "C: \ Python36 \ Python.exe c: \ PythonFiles \ AppServerSvc.py" DisplayName = "TestService" start = auto
อาร์กิวเมนต์แรกของbinpathคือเส้นทางของ python.exe 
อาร์กิวเมนต์ที่สองของbinpath   คือเส้นทางของไฟล์ไพ ธ อนที่เราสร้างไว้แล้ว
อย่าพลาดว่าคุณควรใส่ช่องว่างหลังเครื่องหมาย " = " ทุกช่อง
ถ้าทุกอย่างโอเคคุณควรเห็น 
  [SC] CreateService SUCCESS
ตอนนี้บริการหลามของคุณได้รับการติดตั้งเป็นบริการ windows ทันที คุณสามารถดูได้ในตัวจัดการบริการและรีจิสทรีภายใต้:
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ TestService
3- ตกลงตอนนี้ คุณสามารถเริ่มบริการของคุณได้ที่ผู้จัดการบริการ
คุณสามารถดำเนินการทุกไฟล์หลามที่ให้โครงกระดูกบริการนี้