BIG problems with Gordon's installer

Chris Schaller Chris.Schaller at web.de
Mon Aug 28 12:03:54 EDT 2000


Hello everybody,

  After much work on finding out how to create a correct installer
configuration file, I've tried a more complicated one and ran across a
problem:

  I've got a small program containing

>>> _StringInserts = map(lambda n: pywintypes.Unicode('__' + `n` + '__'), xrange(255))

to create some insertion strings used by win32evtlogutil.FormatMessage

>>> msg = str(win32evtlogutil.FormatMessage(obj, 'Security'))

with
>>> obj.EventID = <some number, e.g. 528 for successfull logon>
>>> obj.StringInserts = _StringInserts
>>> obj.SourceName = 'Security'

Running that script using the Python interpreter works fine, I get some
EventLog message containing my insertion strings (using EventID = 528, 
Successful Logon:

	User Name:	__0__

	Domain:		__1__

	Logon ID:		__2__

	Logon Type:	__3__

	Logon Process:	__4__

	Authentication Package:	__5__

	Workstation Name:	__6__
will be returned).

Unfortunately, after creating a .EXE of that script using Gordon's installer,
executing the file, gets me

Traceback (innermost last):
  File "<string>", line 20, in ?
  File "C:\Program Files\Python\win32\lib\win32evtlogutil.py", line 110, in Form
atMessage
    dllHandle, eventLogRecord.EventID, langid, eventLogRecord.StringInserts)
TypeError: Inserts must be sequence of UnicodeObjects

What went wrong?  I am aware of problems using pywintypes, so I made a copy of
pywintypes15.dll called pywintypes.dll.  My configuration file is

[MYCOLLECT]
type= COLLECT
name= dist_GetAllEvents
bindepends= GetAllEvents.py
misc= MYSTANDALONE
debug = 0

[MYSTANDALONE]
type= STANDALONE
name= GetAllEvents.exe
script= GetAllEvents.py
zlib = APPZLIB
userunw = 0
support = 0
debug = 0

[APPZLIB]
name= GetAllEvents.pyz
dependencies= GetAllEvents.py
excludes= dospath, posixpath, macpath

Sorry for that long posting, but this bothers me really.  Any hints on this
problem?  If you need the whole script, please let me know!

Thanks a lot!!!

bye
  Chris...



More information about the Python-list mailing list