Easy logonscript with mapping of drives and default printers.

Author Message
ja@eltron.no

  • Total Posts : 7
  • Scores: 0
  • Reward points : 0
  • Joined: 11/3/2009
  • Status: offline
Easy logonscript with mapping of drives and default printers. Thursday, November 05, 2009 1:55 AM (permalink)
0
Option Explicit
Dim objNetwork, strRemotePath1, strRemotePath2
Dim strDriveLetter1, strDriveLetter2
strDriveLetter1 = "P:"
strDriveLetter2 = "X:"
strRemotePath1 = "file://conto/Prog"
strRemotePath2 = "file://conto/Files"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
Dim strLocal, strUNCPrinter1, strUNCPrinter2
strLocal = "Ricoh"
strUNCPrinter1 = "file://conto/color"
strUNCPrinter2 = "file://conto/black"
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.SetDefaultPrinter strUNCPrinter1
 
#1
    yeungsam

    • Total Posts : 3
    • Scores: 0
    • Reward points : 0
    • Joined: 11/21/2009
    • Status: offline
    Re:Easy logonscript with mapping of drives and default printers. Saturday, November 21, 2009 11:05 PM (permalink)
    0
    how about if there is password?
     
    #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