473,412 Members | 4,519 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

py2exe failed for running compiled service

hi, i'm trying to generate a service for win XP / win 2k with
python2.3.3 + win32all-163 + py2exe0.5.0
(also tried with pywin32-200.win32-py2.3)

running the console-script "FBxmlserv.py" with python-interpreter and as
EXE-prog goes well.
running the service-module "FBservice.py" with python-interpreter also
works fine
but after comiling with py2exe (with no warnings or errors!) i get on
every host the same error message
when trying to execute the FBservice.exe
FBservice.exe Connecting to the Service Control Manager
Traceback (most recent call last):
File "boot_service.py" line 158, in ?
pywintypes.error: (1063, 'StartServiceCtrlDispatcher', 'Der
Dienstprozess konnte keine Verbindung zum Dienstcontroller herstellen.')

has anyone an idee, what to do?

thanks

my "setup.py" script:
from distutils.core import setup
import py2exe
import sys

if len(sys.argv) < 2:
sys.argv.append ( "py2exe" )
sys.argv.append ( "--verbose" )
sys.argv.append ( "--packages" )
sys.argv.append ( "encodings" )
#sys.argv.append ( "-q" ) # be quiet

class Target:
def __init__ (self, **kw):
self.__dict__.update ( kw )

# for versioninfo resources
self.version = "0.9.0"

FBserver = Target (
description = "firebird backend server",
script = "FBxmlserv.py",
)

FBservice = Target (
description = "firebird windows nt service",
modules = ["FBservice"],
)

excludes = [ "pywin.debugger.dbgcon", "pywin.dialogs", "pywin.dialogs.list" ]
setup (
options = { "py2exe" : {
"compressed" : 1,
"optimize" : 2,
"excludes" : excludes
}
},
zipfile = "lib/shared.zip",
service = [FBservice],
console = [FBserver],
)



Jul 18 '05 #1
1 3701
Peter Teniz <pe*********@inverisa.net> writes:
hi, i'm trying to generate a service for win XP / win 2k with
python2.3.3 + win32all-163 + py2exe0.5.0
(also tried with pywin32-200.win32-py2.3)

running the console-script "FBxmlserv.py" with python-interpreter and as
EXE-prog goes well.
running the service-module "FBservice.py" with python-interpreter also
works fine
but after comiling with py2exe (with no warnings or errors!) i get on
every host the same error message
when trying to execute the FBservice.exe
> FBservice.exe

Connecting to the Service Control Manager
Traceback (most recent call last):
File "boot_service.py" line 158, in ?
pywintypes.error: (1063, 'StartServiceCtrlDispatcher', 'Der
Dienstprozess konnte keine Verbindung zum Dienstcontroller herstellen.')

has anyone an idee, what to do?


This is not a bug.

Services are supposed to be started by the system - the windows service
control manager. They have to be registered before, and the exe accepts
some command line switches that help with this.

You can run the service exe with the '-help' command line switch to list
them:

C:\Python23\Lib\site-packages\py2exe\samples\advanced\dist>MyService.ex e -help
Usage: MyService.exe <options>. Valid options are:
-help
-install
-remove
-auto
-disabled
-interactive
-user: <arg>
-password: <arg>

C:\Python23\Lib\site-packages\py2exe\samples\advanced\dist>

So, first you install your service exe with this command line:

'MyService.exe -install'

The other switches -auto, -disabled, -interactive, -user and -password
allow to specify additional service options.

After that, the service can be started with 'net start myservice' or
with the services applet in the control panel.

Thomas

PS: If this seems not appropriate, it can be changed by hacking the
py2exe/boot_service.py script.
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
5
by: Rene Olsthoorn | last post by:
Dear readers, py2exe has a problem including libxml2. Not at building time, but at runtime. The libxml2.dll cannot be loaded... Is there anyone that NOT has the problem? (and can you drop me...
6
by: bap | last post by:
When I try to run a program on a clean machine using the VPython extensions after compiling with PY2EXE I get the following error message: "The procedure entry point IsWow64Process could not be...
0
by: Thomas Heller | last post by:
**py2exe 0.5.2** released ========================= py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring a python...
2
by: kdahlhaus | last post by:
Is anyone aware of issues with Py2exe and extensions compiled with cygwin/mingw for Python 2.3? I have an extension that wraps access to some C DLLs. The generated executable always segfaults at...
0
by: Durumdara | last post by:
Hi ! I have an application that I compile to exe. 1.) I want to compile main.ico into exe, or int zip. Can I do it ? 2.) Can I compile the result to my specified directory, not into the...
2
by: Maria.Reinhammar | last post by:
I have an app using active_directory.py and the std module asyncore in a Windows Service. Works perfectly! That is, until I try to use py2exe to create a standalone (need to avoid installing the...
6
by: Python Programming on Win32 | last post by:
Hi, I have encountered a problem which I can not figure out a solution to. Tried Googeling it, but to no help unfortunately. The problem is running smtplib in a py2exe compiled exe file. When...
3
by: Kevin | last post by:
Hi everyone, I'm running Python 2.5.1 on an XP-Pro platform, with all the updates (SP2, etc) installed. I have a program (send_file.py) that sends a file to a service provider, using an ftp...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.