Author Topic: OLE Initiate Failed - 1129  (Read 5360 times)

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
OLE Initiate Failed - 1129
« on: May 29, 2014, 06:47:52 am »
I get this error on one machine when I try to use

GMUI   = ObjectCreate("gmw.ui")

What should be my troubleshooting strategy?
(It works fine on all other machines)

td

  • Tech Support
  • *****
  • Posts: 2437
    • WinBatch
Re: OLE Initiate Failed - 1129
« Reply #1 on: May 29, 2014, 07:16:56 am »
First step would be to make sure the COM Automation object represented by the progid "gmw.ui" is registered on the system.  If you have the WIL Type Viewer available on the problematic machine, use it to see if the progid shows up on the progid tab.  If not, you would need to do a registry search with regedit or a WIL script.  If the progid is present, you would also need to make sure that the DLL or exe for the object is also present and in the location indicated in the registry.  The location can be found in the InprocServer32 key under the classid key for the object.  The classid is the braces enclosed, dash delimited hex number found in the CLSID key under the "gmw.ui" progid key in the registry.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #2 on: May 29, 2014, 07:22:17 am »
First step would be to make sure the COM Automation object represented by the progid "gmw.ui" is registered on the system.  If you have the WIL Type Viewer available on the problematic machine, use it to see if the progid shows up on the progid tab.
It shows up, but I get "unable to find a type library" and then I click "Yes" and get "object not found"

td

  • Tech Support
  • *****
  • Posts: 2437
    • WinBatch
Re: OLE Initiate Failed - 1129
« Reply #3 on: May 29, 2014, 07:33:49 am »
Most likely cause is the DLL or exe that implements the object has gone missing or is in the wrong location.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #4 on: May 29, 2014, 07:34:38 am »
If the progid is present, you would also need to make sure that the DLL or exe for the object is also present and in the location indicated in the registry.  The location can be found in the InprocServer32 key under the classid key for the object.

This part paid off!

The location was under LocalServer32, and there was a residual entry in the registry from a previous version of the product. I deleted all the "legacy" entries, and now it works OK.

Thank you.

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #5 on: May 29, 2014, 07:51:28 am »
Actually... what would be the next step?

I'm getting an 1129 with a different program on a different machine, but it passes all the checks you gave me above. Except in this case, I can open it in the WIL Type Viewer.

td

  • Tech Support
  • *****
  • Posts: 2437
    • WinBatch
Re: OLE Initiate Failed - 1129
« Reply #6 on: May 29, 2014, 08:15:27 am »
By different program do you mean a different COM Automation object or a different script or both?  When you access the object with the Type Viewer, does the viewer find a type library or does it ask to instantiate the object?  Is there a possibility that it is a permissions issue?  Do other COM Automation objects instantiate without issue on the system?

The brute force solution may be to simply (or not so simply) reinstall or re-register the COM Automation object.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #7 on: May 29, 2014, 12:48:34 pm »
<< By different program do you mean a different COM Automation object or a different script or both? >>
both; though the script is nearly identical, just a couple of lines, just trying to create the object.

<< When you access the object with the Type Viewer, does the viewer find a type library or does it ask to instantiate the object? >>
I double-click it and it pops right open, and shows all it's methods, classes, library, etc.... no prompt.

<< Is there a possibility that it is a permissions issue?  Do other COM Automation objects instantiate without issue on the system? >>
On this particular computer, I have no problem opening the gmw.ui thing I brought up in my OP.

<<The brute force solution may be to simply (or not so simply) reinstall or re-register the COM Automation object.>>
Shouldn't be too difficult. The publisher says it all gets put in during installation of their software, so it should be a simple uninstall/reinstall, no?
Or, to "re-register the COM Automation object," I'd just do a regsvr32 followed by the dll path and file?

stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #8 on: May 29, 2014, 01:38:20 pm »
Well... uninstall/reinstall (including complete manual deletion of the product's directories)... worked!

Thanks again for your help.

td

  • Tech Support
  • *****
  • Posts: 2437
    • WinBatch
Re: OLE Initiate Failed - 1129
« Reply #9 on: May 29, 2014, 01:42:43 pm »
The Type Viewer behavior indicates that the the object has a type library and that it is properly registered and in the correct location.  The type library can be either a separate file or contained within the object's DLL or exe implementation file.   If you are curious, the registered type library can be found by using it's typeLib GUID  which can be found as the TypeLib key under the object's CLSID key. There is a section in the registry devoted to type libraries and you can search for the typelib GUID in that area. If you poke around under that particular typelib key, you will eventually find the path to the type library.  You could see how it compares to the objects progid location.

Otherwise, sometimes we get lucky and the easiest solution actually works.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


stevengraff

  • Sr. Member
  • ****
  • Posts: 271
Re: OLE Initiate Failed - 1129
« Reply #10 on: May 29, 2014, 01:46:18 pm »
Otherwise, sometimes we get lucky and the easiest solution actually works.
I suppose I'm batting 500... the first issue took a little work to track down; the second solution, uninstall/reinstall, was pretty easy as it turns out. :)