title: Py2exe - win32api.pyc ImportError DLL load failed
body: <p>I am trying to use py2exe to distribute a python application I have written.  Everything seems to go OK, but when I run it on another machine it fails with the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "application.py", line 12, in &lt;module&gt;
    File "win32api.pyc", line 12, in &lt;module&gt;
    File "win32api.pyc", line 10, in __load
  ImportError: DLL load failed: The specified procedure could not be found.
  </code></pre>
  
  <p>I have googled for this and not found very much, but have tried the following suggestions to no avail:</p>
  
  <p>Imported pywintypes and pythoncom before win32api (in the setup.py for py2exe and in the main application)
  Added some code to the setup.py -</p>
  
  <pre><code># ModuleFinder can't handle runtime changes to __path__, but win32com uses them
  import pywintypes
  import pythoncom
  import win32api
  try:
  # if this doesn't work, try import modulefinder
      import py2exe.mf as modulefinder
      import win32com
      for p in win32com.__path__[1:]:
          modulefinder.AddPackagePath("win32com", p)
      for extra in ["win32com.shell"]: #,"win32com.mapi"
          __import__(extra)
          m = sys.modules[extra]
          for p in m.__path__[1:]:
              modulefinder.AddPackagePath(extra, p)
  except ImportError:
      # no build path setup, no worries.
      pass
  </code></pre>
  
  <p>I'm quite new to all this, so any help would be greatly appreciated</p>
  
  <p>Thanks</p>
  
  <p>Jon</p>