WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Errors

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

1129:OleInitiate: Initiate Failed

Keywords: 	  1129: OleInitiate: Initiate Failed

Question:

I am trying to write a script that uses OLE Messaging. Exchange Client 4.0 (SP4) is installed, and I can use OLE messaging from other applications. I am using WinBatch 98A.

The following statement causes an error:

    objSession = ObjectOpen("MAPI.Session")
The error is 1129: OleInitiate: Initiate Failed.

Answer:

Depends. I suspect the "MAPI.Session". Try one shot at:
   MAPI.Session.1
I have MAPI installed, but do not have the MAPI.Session key in my registry under HKEY_Classes_Root.

Some OLE applications do not put in the required registry entries that allow us to automatically start them. But if they are already running then it works.

Perhaps the app you are trying to automate is one of those.


Question 2:

I'm getting the following when trying to open an Access97 database via Winbatch. This only happens on certain computers.
Error:
1129: OleInitiate: Initiate Failed
STOP
On line:
dao = objectopen("DAO.DBEngine.35")

WinBatch 32 2001J
WIL Version: 3.3jcc
Here's the section of code:

dao = objectopen("DAO.DBEngine.35")
ws = dao.CreateWorkspace("JetWorkspace", "admin", "")
db = ws.OpenDatabase(DirMgrDB)
rs= db.OpenRecordSet(ExceptionsTable)

Any ideas?

Answer 2:

My guess is DAO.DBEngine.35 does not exist on those computers. Maybe try searching the registry for that application object. Search under HKEY_Classes_Root for DAO.DBEngine....

It's possible that version 3.5 (35 above) isn't installed. Open up the registry editor on the PC where it doesn't work and do a search for:

DAO.DBEngine
If its installed it will show up as: DAO.DBEngine.35

Question 3:

When I try to run the code below I get the message 'OleInitiate: Initiate failed' on the first line ObjectOpen( "MSWinsock.Winsock"). Any idea what goes wrong here?
objSocket = ObjectOpen("MSWinsock.Winsock")
objSocket.Protocol = 1 ;UDP
objSocket.RemoteHost = BCastAddr
objSocket.SendData(bbpacket)
ObjectClose(objSocket)

Answer 3:

Maybe try searching the registry for that application object. Search under HKEY_Classes_Root for Winsock. If its found you might attempt an ObjectOpen on that object.

Also, you might want to check that the file "mswinsck.ocx" installed and registered on the machine. The file could be present in the system folder, but if it hasn't been registered properly (by a setup program or by using "regsvr32 mswinsck.ocx" the ObjectOpen won't be able to use it.

User response 3:

It's the registering thing. Wouldn't have found this without your help!
Article ID:   W13656
Filename:   1129 OLE Initiate Failed.txt
File Created: 2003:01:24:13:57:08
Last Updated: 2003:01:24:13:57:08