I want to develop a Windows service using Python. As a try, I copied code from this page. Then I compiled it to the EXE file with PyInstaller. Then I use WiX to make an MSI file and it as a Windows 11 service. But after it is installed, my service in the SCM window is always "STOPPED" and can't be started. I don't know why. My WiX project is just normal; I added a ServiceInstall element. I don't know if WiX matters. The whole process doesn't report any error. I checked Event Viewer. I got error in it. It reads like: waiting for service MyServiceTest connection timeout (30000 ms) But I didn't understand the error message yet. I finally found the fix here. Continue reading...