pyinstaller and win32com
===

So I'm confused about how to get pyinstaller to build an application that uses win32com. I have a script that runs with no problem from IDLE or command line that interacts with excel via

    xl = Dispatch('Excel.Application')

followed by some other really basic excel calls, then closes. I've seen advice to include "clsctx=pythoncom.CLSCTX_LOCAL_SERVER" as an argument to Dispatch, but it doesn't change anything. Whenever I build the script, I get an error similar to this

    Traceback (most recent call last):
    File "<string>", line 7, in <module>
    File "C:\Python27\trunk\iu.py", line 436, in importHook
    mod = _self_doimport(nm, ctx, fqname)
    File "C:\Python27\trunk\iu.py", line 521, in doimport
    exec co in mod.__dict__
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client", line 11,
    in <module>
    File "C:\Python27\trunk\iu.py", line 436, in importHook
    mod = _self_doimport(nm, ctx, fqname)
    File "C:\Python27\trunk\iu.py", line 521, in doimport
    exec co in mod.__dict__
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client.gencache",
    line 662, in <module>
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client.gencache",
    line 58, in __init__
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client.gencache",
    line 649, in Rebuild
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client.gencache",
    line 65, in _SaveDicts
    File "Myskript\build\pyi.win32\Myskript\outPYZ1.pyz/win32com.client.gencache",
    line 141, in GetGeneratePath
    IOError: [Errno 22] invalid mode ('w') or filename: 'C:\\Python27\\trunk\\Myskri
    pt\\dist\\Myskript.exe?844863\\__init__.py'

That's copied from this german question http://www.python-forum.de/viewtopic.php?f=1&t=25010 but my error is basically the same. I tried to implement the advice given on that page to no avail either.

I know next to nothing about COM stuff, just hoping to get this little excel app to run.
