Link to home
Start Free TrialLog in
Avatar of Jyotikadian
Jyotikadian

asked on

VBScript to Map network drive

Hi all,

Can someone help me with a VBScript to map a network drive based on Domain account ,on machine ,on group of DL .
thanks a lot in advance.
ASKER CERTIFIED SOLUTION
Avatar of CSecurity
CSecurity
Flag of Iran, Islamic Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This code adds a network drive to address of RemotePath. If the address already exists, removes that... ;)
or you can use WNetAddConnection API function

http://vb-helper.com/howto_map_network_drive.html
shijusn, they are both for VB6... Jyotikadian asks for VBscript code.
Avatar of Jyotikadian
Jyotikadian

ASKER

Hi CSecurity,

Though your script works but it does not specify the Domain account or Domain Distribution list. Can you please help me a bit more?
What you want to do with domain account? You just going to map a network drive and network drive have a path.

You can specify the path in my code and then map it.
may be not domain administrator has capable to see the drive

8->
may be just shell with net use?
You can use net use command like:

net use w: \\monolith\pc_dist boviks_password /user:SCS\bovik