Tuesday, August 30, 2011

Failed to create WIN32OLE object from AutoItX3.Control


This is a  problem of registering the dll file, and hence it create an object of AutoIt. To register the autoit dll from command prompt, use following command


1.regsvr32 C:\ruby192\lib\ruby\gems\1.9.1\gems\watir-1.8.1\lib\watir\AutoItX3.dll


Although it does call the register code before creating an object, the 
error was in creating an autoit object.


2.You can also try adding line to top of the file


require 'win32ole'


3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. getting below error
    The module ****** was loaded but the call to Dllregisterserver faild with error code

    ReplyDelete
  3. you have to do it as Administrator

    ReplyDelete