Ano-Tech Computers
Enter keyword:

Windows AD domain login script
Problem:
What does a typical login script look like when I just want to map a few drive letters?
 
Solution:
'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"

 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles