Drive Mapping Script

G

Guest

Hey Wizards,

I have a VB script that maps network drives. I wanted the script to auth. a
user to AD as well. Can someone help?

Dim objNet
on error resume next
Set objNet = CreateObject("Wscript.Network")
on error resume next
objNet.MapNetworkDrive "l:", "\\server\userfolder"
on error resume next
objNet.MapNetworkDrive "m:", "\\server2\app\userfolder"
WSCript.Quit
 
T

Torgeir Bakken \(MVP\)

Ray said:
Hey Wizards,

I have a VB script that maps network drives. I wanted the script to auth. a
user to AD as well. Can someone help?

Dim objNet
on error resume next
Set objNet = CreateObject("Wscript.Network")
on error resume next
objNet.MapNetworkDrive "l:", "\\server\userfolder"
on error resume next
objNet.MapNetworkDrive "m:", "\\server2\app\userfolder"
WSCript.Quit
Hi

The MapNetworkDrive method supports adding username and password
as parameters.

WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top