No Noam. For some unknown reason, that didn't work either. However, I
found that comtypes.client.GetModule() generates a wrapper when
called. So the following code did the job:
import glob
import os
#Generates wrapper for a given library
def wrap(com_lib):
try:
comtypes.client.GetModule(com_lib)
except:
print "Failed to wrap {0}".format(com_lib)
sys32dir = os.path.join(os.environ["SystemRoot"], "system32")
#Generate wrappers for all ocx's system32
for lib in glob.glob(os.path.join(sys32dir, "*.ocx")):
wrap(lib)
#Generate for all dll's in system32
for lib in glob.glob(os.path.join(sys32dir, "*.tlb")):
wrap(lib)
Having the relevant com lib wrapped, now I can access
IWshRuntimeLibrary just fine.
Thank you for your help all along.
Regards,
Gurinder