VBS to map a drive AND save credentials

Author Message
totalimpact

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 1/4/2012
  • Status: offline
VBS to map a drive AND save credentials Wednesday, January 04, 2012 12:16 PM (permalink)
0
not your typical "map my drive" -
 
I have visiting users that I need to give easy access to windows server shares and printers, so I have made a web server on the lan where they can download mapdrive.vbs
 
Problem being - I dont want to store a "startup script" on these computers, but I do want them to have access when rebooting without re-running the script - I was assuming bStoreInProfile would do this, but it seems users no longer have access after a reboot on Windows 7 clients.
 
 WshNetwork.MapNetworkDrive "s:", "\\server\MyShare", bStoreInProfile, "someuser", "somepassword" 

 
I can easily do a bat script that does this:
 
 net use s: \\server\myshare somepassword /USER:mydomain\visitor /persistent:yes 

 
thanks -j
 
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    Re:VBS to map a drive AND save credentials Thursday, January 05, 2012 3:04 AM (permalink)
    0
    That parameter is intended to keep the mapping persistent. Just out of curiosity, where do you set the value of bStoreInProfile and what do you set it to?
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2

      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