Method DriveMapDel

AutoIt X

Method Reference


DriveMapDel

Disconnects a network drive

DriveMapDel "device"

Parameters

drive The device to disconnect, e.g. "O:" or "LPT1:".

Return Value

Success: Returns 1.
Failure: Returns 0 if the disconnection was unsuccessful.

Remarks

If a connection has no drive letter mapped you may use the connection name to disconnect, e.g. \\server\share

Related

DriveMapAdd, DriveMapGet

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

' Map X drive to \\myserver\stuff using current user
oAutoIt.DriveMapAdd "X:", "\\myserver\stuff"

' Disconnect
oAutoIt.DriveMapDel "X:"