文件COM组件注册:
PowerTool 注册COM组件:
注意,COM注册需要满足如下条件:
1、4.0.4.9版本或更高版本的PooTool应用程序。
2、NET版本:.NET 3.5 (or higher)
3、Visual Studio 2010 版本
4、python版本为32位的,Win32Com是32位的
安装上面3个软件,然后进行com注册。
1.Register the assembly and generate a TLB file.
切换到.Net路径:c:WindowsMicrosoft.NETFrameworkv4.0.30319). 然后执行命令:
RegAsm.exe [path to powertool.exe] /tlb:PowerTool.tlb
PowerTool注册,如要设置其安装路径,命令如下:
RegAsm.exe“D:Program Files (x86)Monsoon Solutions IncPower MonitorPowerTool.exe”/tlb:PowerTool.tlb
2.Register the assembly with the GAC.
安装Visual Studio(2010 32版本or later
打开Visual studio 命令行工具:
If you need to uninstall the assembly from the GAC, you can issue the command:
gacutil /uPowerTool
注册组件方法:
启动Visual Studio命令工具,然后执行如下命令:
gacutil /i“D:Program Files (x86)Monsoon Solutions IncPower MonitorPowerTool.exe”
查看安装版本:
gacutil /lPowerTool
注:
注册lib版本问题(32/64位):
c:WindowsMicrosoft.NETFrameworkv4.0.30319和c:WindowsMicrosoft.NETFramework64v4.0.30319分别注册32位和64位,win32com调用需要注册32位组件,否则提示“无注册类”。