I need to check if a network share is mapped or not. The idea I got is to run a command "net use" and then parse the resulting text to find out if my network share is mapped or not. For example, here is a result for net use command:
I can search for a string "\\192.168.100.23\share1" to find if the share is already mapped or not.
I need this method for searching because, I do not know in advance which Drive Letter is used for the network share. Also it is possible that the network share is mapped without a drive letter.
Can anybody help, how I can run "net use" command and get the result in a text buffer so that I can parse it? I do not want to create a temporary text file (like net use >> c:\temp.txt) and then parse the text file.
A different question but related. Is there an easy method in Autoit to get the drive letter for a network share which has been mapped?
Thanks!