troubleshooting Question

objNetwork.MapNetworkDrive VBScript question

Avatar of Chris James
Chris JamesFlag for Canada asked on
Windows Server 2003Active Directory
7 Comments1 Solution2321 ViewsLast Modified:
I have the following script set for when users log onto the domain:
(SEE CODE SNIPPET)

Id like to know, if the computer doesn't have the appropriate user name and password saved to connect to the specified servers, how can I implement that into the script (entering the user name and password) so the drives are automatically mounted?

Thanks in advance,
On Error Resume Next
 
Dim WSHNetwork, path
 
Set objNetwork = CreateObject("WScript.Network")
 
 
objNetwork.MapNetworkDrive "X:" , "\\192.168.0.103\server"
objNetwork.MapNetworkDrive "Y:" , "\\192.168.0.103\Documentation"
objNetwork.MapNetworkDrive "S:" , "\\192.168.0.100\signature"
objNetwork.MapNetworkDrive "O:" , "\\192.168.0.100\edocs"
objNetwork.MapNetworkDrive "B:" , "\\192.168.0.100\bboard"
objNetwork.MapNetworkDrive "I:" , "\\192.168.0.100\BVImages"
 
wscript.sleep 300
 
 
'Clean Up Memory Used
set WSHNetwork = Nothing
 
'Quit the Script
wscript.quit
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros