Author Topic: IWshNetwork.RemoveNetworkDrive Method  (Read 2578 times)

0 Members and 1 Guest are viewing this topic.

Online José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2524
  • User-Rate: +209/-0
  • Gender: Male
IWshNetwork.RemoveNetworkDrive Method
« on: July 14, 2008, 08:18:37 PM »

The following code removes the logical drive "E."

JScript
Code: [Select]
var WshNetwork = WScript.CreateObject("WScript.Network");
WshNetwork.RemoveNetworkDrive ("E:");

VBScript
Code: [Select]
Dim WshNetwork
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork. RemoveNetworkDrive "E:"

PowerBASIC
Code: [Select]
DIM pWshNet AS IWshNetwork
pWshNet = NEWCOM "WScript.Network"
pWshNet.RemoveNetworkDrive UCODE$("E:")