Net USE command to VB

adrieldeguzman
adrieldeguzman used Ask the Experts™
on
Does anyone know a VB script that will do the same as this dos command:  

net use h: \\FilesServer\home\%username%

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.MapNetworkDrive "H:", "\\FilesServer\home\" & objNetwork.UserName

Open in new window

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial