• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

IWshNetwork.MapNetworkDrive Method

Started by José Roca, July 14, 2008, 08:23:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code maps the logical drive "E" to a network share with the UNC name "\\Server\Public."

JScript


var WshNetwork = WScript.CreateObject("WScript.Network");
WshNetwork.MapNetworkDrive ("E:", "\\\\Server\\Public");


VBScript


Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\Server\Public"


PowerBASIC


DIM pWshNet AS IWshNetwork
pWshNet = NEWCOM "WScript.Network"
pWshNet.MapNetworkDrive UCODE$("E:"), UCODE$("\\Server\Public")