script->service.exe

Mark Hammond mhammond at skippinet.com.au
Thu Feb 27 01:40:47 EST 2003


Tomas Brixi wrote:
> Hello,
> 
> I have a question regarding script implementing a windows service converted into .exe.
> When I install the script a using pyservice.exe and log something the event viewer displays
> correctly
> the messages I want to log. I know module service util is build into pyservice.exe
> 
> But when I convert the script using py2exe I get all logs displayed in event viewer like this one:
> ---------------
> The description for Event ID ( 4098 ) in Source ( myservice ) cannot be found. The local computer
> may not have the necessary registry information or message DLL files to display messages from a
> remote computer.....
> ---------------
> Maybe I have forgot to include something. Can anyone help me?

You will probably need to register your own eventlog source, nominating 
a file with embedded messages.  This will generally be win32service.pyd 
(there is no win32service.py, so it shouldn't be included!)  See 
win32evtlogutil.py

I'm not familiar enough with py2exe to know what it does with services, 
but generally pythonservice.exe itself takes care of this.  If py2exe is 
not using the code in pythonservice.exe, you will have to arrange it 
yourself.





More information about the Python-list mailing list