unknown OLE server: ‘AutoItX3.Control’ (WIN32OLERuntimeError)
来源:互联网 发布:chinaz 源码 编辑:程序博客网 时间:2024/05/16 12:14
Following error is displayed when we run the script,
>ruby test.rb
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in `initialize': unknown OLE server: `AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
Invalid class string
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in `new'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in `autoit'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:438:in `autoit'
from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:426:in `bring_to_front'
from test.rb:6
>Exit code: 1
Solution
You need to register AutoIt.
In a command window, navigate to the directory where you've put AutoIt and type:
regsvr32 AutoItX3.dll
My directory is C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/AutoItX3.dll.
Also can use below command to register AutoIt.
regsvr32 C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/AutoItX3.dll (For Ruby 1.8.6)
regsvr32 C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/AutoItX3.dll (For Ruby 1.8.7)
After the above action, I got the error message is as following,
The module "AutoItX3.dll" was loaded but the call to DllRegisterServer failed with error code 0x80070005.
Solution
Return code was: 0x80070005
If you are logged on with a user account that does NOT have administrative privileges, you will experience this behavior if the DLL file writes to the registry, or changes files in the %SystemRoot%/System32 folder.
To workaround this behavior, log on with an account that has administrative privileges.
- unknown OLE server: ‘AutoItX3.Control’ (WIN32OLERuntimeError)
- OPC (OLE for Process Control)
- OPC (OLE for Process Control)
- CoCreateInstance of OLE control failed
- CoCreateInstance of OLE control failed
- OPC(ole for process control)技术论坛
- OPC (OLE for Process and Control)
- Specification of OLE for Process Control
- Notes on Implementing an OLE Control Container
- pb9.0 insert ole control 错误的解决办法
- delphi activex "The OLE control does not support self-registration"
- (ZT)Notes on Implementing an OLE Control Container
- How To Enumerate OLE and VB Controls from an OLE Control
- Server Control Properties Example
- ArcGIS Server EditorTask control
- .net server control
- simple control server
- Unknown MySQL server host 'localhost'
- 工作了
- 不知道为何错,不能编译出来
- 内存分配
- DB2 tablespace 和 bufferpool的理解
- java第二课:数据类型、运算符号和关键字问题
- unknown OLE server: ‘AutoItX3.Control’ (WIN32OLERuntimeError)
- log4net初探
- java第三课:语句
- Mysql 查看连接数,状态
- MONO-Android -> Android.NET
- 用Thread做点自动化的事
- 迁移表从一个库到另外一个库
- VC++6.0 Link问题?求高人指点
- 进度条,今天用到了