英文:
Portable application not showing in win32com browser, how to dispatch it?
问题
这是一款便携软件,可与科学仪器通信。它是一款便携软件,可以将整个文件夹复制到任何电脑上的任何位置。
通过双击“.exe”文件,可以开始使用此软件与仪器通信。它具有一个类似于“portable.application”的ProgID,但在com浏览器中没有显示。
当我执行
win32com.client.Dispatch("portable.application")
出现错误
com_error: (-2147221005, 'Invalid class string', None, None)
我该如何调用此应用程序?我猜我需要以某种方式将应用程序注册到注册表中。
英文:
There is a portable software which communicates with a scientific instrument. It is a portable software, where one can just copy the whole folder to anywhere in any PC.
And by double clicking the '.exe' file, one can start to talk to the instrument using this software. It has a ProgID like "portable.application", but it is not shown in the com browser.
When I do
win32com.client.Dispatch("portable.application")
The error is
com_error: (-2147221005, 'Invalid class string', None, None)
How can I dispatch this application? I guess I need to register the application to the registry somehow.
答案1
得分: 2
一种检查COM对象属性的方法是使用位于Python site-packages文件夹中的win32com\client
目录下的combrowse.py
。
如果你要查找的portable.application
未列出,那么无法访问该应用程序。
请查看以下链接,可能会有所帮助:
http://timgolden.me.uk/pywin32-docs/html/com/win32com/HTML/QuickStartClientCom.html
英文:
One way to check the attributes in a COM object is using the combrowse.py
available on win32com\client
in your python site-packages folder
If the portable.application
you're looking for isn't listed, you can't access that application.
Take a look at the following link that might help..
http://timgolden.me.uk/pywin32-docs/html/com/win32com/HTML/QuickStartClientCom.html
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论