Skrevet av Emne: Windows AD domain login script  (Lest 4276 ganger)

ATC

  • Gjest
Windows AD domain login script
« på: 08. Juli 2009, 10:25 am »
  • [applaud]0
  • [smite]0
  • What does a typical login script look like when I just want to map a few drive letters?



    ATC

    • Gjest
    [Solved] Windows AD domain login script
    « Svar #1 på: 08. Juli 2009, 10:25 am »
  • [applaud]0
  • [smite]0
  • 'Comments begin with an apostrophe

    'Without this line, an already mapped drive will cause the script to stop with an error message:
    On error resume next

    'Create a network script object thingie
    Set wshNetwork = CreateObject("WScript.Network")

    'Actually map the drive letters
    wshNetwork.MapNetworkDrive "i:", "\\Hermes\" & wshNetwork.UserName
    wshNetwork.MapNetworkDrive "m:", "\\Hermes\Media"
    wshNetwork.MapNetworkDrive "p:", "\\Atlas\Programs"
    wshNetwork.MapNetworkDrive "s:", "\\Prodigit\Setup"
    wshNetwork.MapNetworkDrive "v:", "\\Atlas\Media"
    wshNetwork.MapNetworkDrive "w:", "\\Atlas\Warez"