Login script

Discussion in 'Ruby' started by joey se, Feb 20, 2006.

  1. joey se

    joey se Guest

    hello!

    on windows 2003. id like to use ruby to process my login script.

    how do you read all mapped drives, map a drive or disconnect a mapped
    drive with ruby?

    can someone point me to any documentation with regards to making calls
    similar to the above?


    thank you so much!

    joey

    --
    Posted via http://www.ruby-forum.com/.
    joey se, Feb 20, 2006
    #1
    1. Advertising

  2. joey se

    James Britt Guest

    joey se wrote:
    > hello!
    >
    > on windows 2003. id like to use ruby to process my login script.
    >
    > how do you read all mapped drives, map a drive or disconnect a mapped
    > drive with ruby?
    >



    I have a script to map some drives, with stuff such as:

    require 'win32ole'
    net = WIN32OLE.new('WScript.Network')
    user_name = 'some_user_name'
    password = 'top-secret-password'


    net.MapNetworkDrive( 'X:', '\\james3480\$C', nil, user_name, password )


    Poke around MSDN for WScript.Network examples using JScript or VBScript.

    That's how I worked out what I needed.


    --
    James Britt

    http://www.ruby-doc.org - Ruby Help & Documentation
    http://www.artima.com/rubycs/ - The Journal By & For Rubyists
    http://www.30secondrule.com - Building Better Tools
    James Britt, Feb 20, 2006
    #2
    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. William F. Robertson, Jr.
    Replies:
    0
    Views:
    430
    William F. Robertson, Jr.
    Jul 2, 2003
  2. Hermit Dave

    Forms Login Page Not Login Out

    Hermit Dave, Jan 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    458
    Hermit Dave
    Jan 13, 2004
  3. Nans
    Replies:
    2
    Views:
    20,074
    Martin Marinov
    Jun 17, 2004
  4. Rajat
    Replies:
    3
    Views:
    680
    Jorgen Grahn
    Jan 8, 2010
  5. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    544
    Jan Kaliszewski
    Jan 7, 2010
Loading...

Share This Page