# Win32OLE problem

**URL:** <https://www.ruby-forum.com/t/win32ole-problem/109966>\
**Category:** Ruby\
**Created:** [July 20, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/win32ole-problem/109966 "2007-07-20T19:23:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 20, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/win32ole-problem/109966/1 "2007-07-20T19:23:50Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 21, 2007, 1:16am UTC](https://www.ruby-forum.com/t/win32ole-problem/109966/2 "2007-07-21T01:16:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 23, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/win32ole-problem/109966/3 "2007-07-23T16:24:23Z")

</div>

On 7/20/07, Todd B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > ```
> > OLE error code:8000500F in <Unknown>
> > 
> > ```
> 
> Todd
> 
> –  
> Posted via [http://www.ruby-forum.com/](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)
