Map A drive

Author Message
jeyan123

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 3/4/2005
  • Location:
  • Status: offline
Map A drive Friday, March 04, 2005 6:15 AM (permalink)
0
Hello,
I wolud like to map a network drive using VBScript. But I need to give username and password to map that drive. Ifanyone know, please help me.

Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "X:", "\\home\projects"
 
#1
    mbouchard

    • Total Posts : 2110
    • Scores: 29
    • Reward points : 0
    • Joined: 5/15/2003
    • Location: USA
    • Status: offline
    Re: Map A drive Friday, March 04, 2005 6:27 AM (permalink)
    0
    Take a look at the WSH docs in my sig. There you will find an example on how to do this.
     
    #2
      esnmb

      • Total Posts : 453
      • Scores: 0
      • Reward points : 0
      • Joined: 1/11/2005
      • Location: USA
      • Status: offline
      Re: Map A drive Friday, March 04, 2005 9:36 AM (permalink)
      0
      Dim WshNet
      Set WshNet = CreateObject("WScript.Network")
      WshNet.MapNetworkDrive "y:", "\\server\share","True","user","pass"
      WshNet.MapNetworkDrive "z:", "\\server\share","True","user","pass"

      http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthmapnetworkdrive.asp
       
      #3
        jeyan123

        • Total Posts : 2
        • Scores: 0
        • Reward points : 0
        • Joined: 3/4/2005
        • Location:
        • Status: offline
        Re: Map A drive Monday, March 07, 2005 12:08 PM (permalink)
        0
        Thanks
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9