last day (14 days later) » 

3:38 PM
0
Q: Python Windows Service - Not responding to start/stop from built exe (but works in python)

BusturdustThis is my first time building a windows service, and I thought I had it working. Installing as python aservice.py install works fine, and responds accordingly. However, since the machines that I will need to install this service on, will not have python installed, I wanted to build it into an ...

 
do you have extra files in your application? if yes : add import sys,os;sys.path.append(os.getcwd()+'/')
 
@SDilmac no extra files, but I am importing a custom module. I am pretty sure this is related to the py2exe, I am going through the docs right now hoping to find something
 
Your application(exe) work fine?
 
The Exe works fine as far as Logon_Service.exe install However Logon_Service.exe start Does not
@SDilmac I Found py2exe.org/index.cgi/py2exeAndWindowsServices I am trying to edit for my uses, no luck yet
 
try (on root cmd): sc create newservice binpath= c:\your_app_path without any one additional arguments. and check sc documents
 
3:38 PM
@SDilmac Again, it is successfull in installing the service, but it doesnt respond to any requests (start)
 
try (on root cmd) : service your_exe_name start
hello
 
3:57 PM
Hi
I am on a phone as I am in non Internet connected test center
I was actually able to get it to start stop. But now have issue with sqlite not connecting over unc. :(
when I get back to my desk I will give u the setup.py I used to get to work and u can post as answer for credit
 
4:40 PM
`from distutils.core import setup
import py2exe


# setup.py

#
class Target:
def __init__(self, **kw):
self.__dict__.update(kw)
# for the versioninfo resources
self.version = "0.5.0"
self.company_name = "NBCUniversal"
self.copyright = "no copyright"
self.name = "Test22"


myservice = Target(
description = 'Edit Logon Service',
modules = ['Logon_Service'],
cmdline_style='pywin32'
)

setup(
options = {"py2exe": {"compressed": 1, "bundle_files": 1} },
zipfile = None,
servi`
There is the setup.py that worked for distribution
if you post it as the asnwer, Ill accept it since you helped guide me generally where I needed to be :)
 

last day (14 days later) »