Method DriveMapGet

AutoIt X

Method Reference


DriveMapGet

Retreives the details of a mapped drive

DriveMapGet"device"

Parameters

device The device (drive or printer) letter to query. Eg. "O:" or "LPT1:"

Return Value

Success: Returns details of the mapping, e.g. \\server\share
Failure: Returns a blank string "" and sets oAutoIt.error to 1.

Related

DriveMapAdd, DriveMapDel

Example


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

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

' Get details of the mapping
WScript.Echo "Drive X: is mapped to " & DriveMapGet("X:")