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

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

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

1129 OleInitiate Failed


Question:

I'm running code similar this:
driveletter = "z:"
objSvc = ObjectGet("Winmgmts:\\.\root\cimv2") 
objEnum = objSvc.ExecQuery(StrCat("Select * from win32_logicaldisk where DeviceId = '", driveletter,"'"), "WQL", 48) 
ForEach obj in objEnum 
    Message(driveletter, obj.providername )
next
objEnum = 0
objSvc = 0
However, I'm getting a "1129: OleInitiate Failed" on a couple of PCs when it hits the "objSvc = ObjectGet("Winmgmts:\\.\root\cimv2")" line. Any ideas?

As a follow up:

I've also noticed that I'm unable to do ADSI LDAP queries from this machine as well. I get an 'unable to parse' error. However, the error only happened on certain users while they only have 'user' level access on the PC. If I make them local admins, then all is fine.

I've tried deleting their local profile and then having it recreated upon logon, but no dice. Any ideas what security rights are needed for WBT to make ADSI LDAP queries or OLE calls?

Answer:

Not sure. Maybe check this out: http://msdn.microsoft.com/en-us/library/windows/desktop/aa392726(v=vs.85).aspx

User Reply:

In case anyone else runs into this: I fixed the problem. It turned out the be a WMI problem. I followed the solution at the following link and everything it fine now. Took 2 days to figure out, but only 2 seconds to fix. Oh well.

http://help.lockergnome.com/windows/Unable-connect-WMI-service--ftopict195453.html


Article ID:   W17084
File Created: 2012:12:10:14:04:02
Last Updated: 2012:12:10:14:04:02