Forum: Ruby Win32OLE problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Glen H. (Guest)
on 2007-07-20 21:23
(Received via mailing list)
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 <Unknown>
      <No Description>
    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)
Todd B. (Guest)
on 2007-07-21 03:16
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 <Unknown>
>       <No Description>
>     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
Glen H. (Guest)
on 2007-07-23 18:24
(Received via mailing list)
On 7/20/07, Todd B. <removed_email_address@domain.invalid> 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 ;)


--
"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)
This topic is locked and can not be replied to.