Win32OLE problem

When executing this code:

adsi = WIN32OLE.connect(“WinNT://TECHNO/ARDR_108,group”)
adsi.put(“Add”, “glen”)

I get the following error:

WIN32OLERuntimeError: put
OLE error code:8000500F in

HRESULT error code:0x80020009
Exception occurred.
from (irb):20:in ‘method_missing’
from (irb):20
from :0

It shouldn’t be a permissions issue, the account I’m running this with
is in
Schema Admins, Domain Admins, etc…

The group in question is a global security group but the account exists
on
the same domain. I haven’t tried with other groups however it happens
with
other user accounts.

Any insight would be much appreciated although I don’t think it is of
horrible importance at this point. I’m probably just going to by-pass
Windows completely and do it with NET::LDAP. Just thought it was
curious
and it would make things simpler if I could get it to work this way.

Thanks in advance,
Glen


“Hey brother christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Glen H. wrote:

When executing this code:

adsi = WIN32OLE.connect(“WinNT://TECHNO/ARDR_108,group”)
adsi.put(“Add”, “glen”)

I get the following error:

WIN32OLERuntimeError: put
OLE error code:8000500F in

HRESULT error code:0x80020009
Exception occurred.
from (irb):20:in ‘method_missing’
from (irb):20
from :0

If I’m reading the error correctly, “put” is not being recognized as a
valid method. Does the object model say “put” is a valid method?

Todd

On 7/20/07, Todd B. [email protected] wrote:

OLE error code:8000500F in <Unknown>

Todd


Posted via http://www.ruby-forum.com/.

I didn’t even think to look at that. I was getting the code snippet
from
some other code that wasn’t mine. It would appear that put isn’t a
defined
method for a WIN32OLE object. Strange, I’ve switched approaches now
though
and am using Net::LDAP to do what I need to do.

Thanks for doing my reading for me :wink:


“Hey brother christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)