473,568 Members | 2,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.p y" line 158, in ?
pywintypes.erro r: (1063, 'StartServiceCt rlDispatcher', 'Der
Dienstprozess konnte keine Verbindung zum Dienstcontrolle r 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.appen d ( "-q" ) # be quiet

class Target:
def __init__ (self, **kw):
self.__dict__.u pdate ( 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 3744
Peter Teniz <pe*********@in verisa.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.p y" line 158, in ?
pywintypes.erro r: (1063, 'StartServiceCt rlDispatcher', 'Der
Dienstprozess konnte keine Verbindung zum Dienstcontrolle r 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\advanc ed\dist>MyServi ce.exe -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\advanc ed\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
2976
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 "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google....
5
4012
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 your setup.py scipt, please). Thanks in advance, Rene O.
6
4043
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 located in the dynamic link library KERNEL32.dll" . The compiled version runs fine on the original machine (win NT OS) but gives this error message on...
0
1304
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 installation. Console and Windows (GUI) applications, windows NT services, exe and dll COM servers are supported. This is a bugfix release.
2
1782
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 startup, although things work fine when running through the normal python interpreter. I had a guess that perhaps the issue stems from my...
0
1551
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 dist ? I want to structure my projects like this:
2
4135
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 entire Python etc. on the target system). When I try to start the installed Service, the system tells me it terminates prematurely and in the...
6
2960
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 it tries to establish a socket to the mail server it fails. Just wondering someone has encountered this before, and if someone
3
1962
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 connection. The program works properly, and I've created an 'exe' of it, using py2exe. It was distrubuted to my user base a couple of weeks ago and...
0
7693
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.