VBScript how to check what a drive is mapped to -


I am trying to check whether a drive has been mapped to a fixed location, how the map mapped How can I check? I am planning to stop the script if it is mapped to the wrong location and using subst D: C: \ folder , if this is not the map (which I wanted ) Or if it is mapped from where I want ( C: \ folder for now)

Set WshNetwork = WScript.CreateObject ("WScript.Network") Set oDrives = WshNetwork.EnumNetworkDrives Oppinters = WshNetwork.EnumPrinterConnectionsWScript.Echo "Network Drive Mapping:" for i = 0 ODrives .Count - 1 Rann 2 WScript.Echo "Drive" & amp; ODrives.Item (I) & amp; "=" & Amp; ODrives.Item (I + 1) Next WScript.Echo WScript.Echo "Network Printer Mapping:" i = 0 to opeinters. Calculation - 1 step 2 WScript.Echo "Port" & amp; Opperinters ITEM (I) and Ape "=" & Amp; Opper. Item (I + 1) Next

Comments