OK. Let me show you where I am in the process. I think you all would probably enjoy helping me with what I have wrong or with what I am missing...

Using DriveEnum(), I have the following code in my Kix script where $netdrives=DriveEnum(3):

code:
 If InStr($netdrives,"\\server\sharename")
$t = OpenFile("\\server\share\badmap.csv", "W", 1, 0)
If @error = 0
WriteLine($t, "@WKSTA, $IP, @USERID, @FULLNAME, $os, $netdrives" + @CRLF)
EndIf
EndIf

My first problem is, I have three share names that have the same first 2 letters, but I need to detect each one separately (and remember what I found). Lets say the shares are 1) Win, 2) Window, 3) Windows. When I do the following code, it finds all three...\\server1\Win, \\server1\Window, and \\server1\Windows. How can I overcome this?
code:
 If InStr($netdrives,"\\server1\Win")
$t = OpenFile

My next problem is I don't know how to then remember the specific drive letter associated with the specific mapping I am looking for in the "If InStr()".

Once these problems are solved, I think I know how to delete that mapping using the remembered drive letter, and then re-map persistantly using MapDrive() to the new path.

Can you help me fill in the gaps, change my thinking, or fix my logic? [Razz]