Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive Mapping ? ? ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi All,
Can anyone give me a bit of code in VBScript that will allow me to map a drive ? (Similar to the DOS NET USE command). I know it can be done by starting a DOS session and running the NET USE command but I would like to find a better way of doing it than that. Thanx. . .
 
You may need to install WMI if you are not running Windows 2000.

set wshNetwork = WScript.CreateObject( "WScript.Network" )

wshNetwork.mapNetworkDrive "Z:", "\\MYSERVER\MYSHARE",true
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top