If the installation location is in a restricted area. and if a directory gen_py exists in the win32com directory, working as restricted user throws an exception, either while
- generating the default __init__.py if not existing during "from win32com import client"
- rebuilding the gencache cache (dicts.dat) during "from win32com.client import gencache"
- generating an on demand wrapper (gencache.EnsureDispatch)
This fix checks the accessibility of the directory and remaps the gencache path to the temp directory.