ADSI question: put methods

Discussion in 'Ruby' started by Daniel Berger, Aug 25, 2005.

  1. Hi all,

    ruby 1.8.2 (2004-12-25) [i386-mswin32]
    Windows XP Pro

    I'm having a bit of trouble with the following code. I can get a
    connection, and create the user, once I call setinfo. However, if I
    try to use any of the put_ methods, I get an error:

    require "socket"
    host = Socket.gethostname

    adsi = WIN32OLE.connect("WinNT://#{host},Computer")
    user = adsi.create("user", "foo")
    user.put_Description("test account") # Boom!
    user.setinfo

    However, if you replace the bad line with:

    user.put("Description", "test account")

    Then it works. Shouldn't it work either way?

    Regards,

    Dan
     
    Daniel Berger, Aug 25, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shiv

    ADSI - User A/c Info Question

    shiv, Nov 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    346
    Natty Gur
    Nov 16, 2003
  2. Mutley

    IIS and ADSI question

    Mutley, Feb 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    363
    Mutley
    Feb 6, 2006
  3. Simon Chung-Jen Chuang

    ADSI question

    Simon Chung-Jen Chuang, Sep 3, 2003, in forum: ASP General
    Replies:
    1
    Views:
    130
  4. geertm

    asp adsi question

    geertm, Dec 2, 2003, in forum: ASP General
    Replies:
    0
    Views:
    94
    geertm
    Dec 2, 2003
  5. Kenneth McDonald
    Replies:
    5
    Views:
    342
    Kenneth McDonald
    Sep 26, 2008
Loading...

Share This Page