Uh - not exactly..

The function that Mary requested should Map, Unmap & Map, or just Unmap. Your first one allowd Map or Unmap, but removed the Unmap & Map functionality. This could affect the operation of the original script. While it added the Unmap feature that Mary required, she would have to modify any calls from
 Code:
SetDrive('D:','\\server\share','my share', 1)
to
 Code:
SetDrive('D:','','', 1)
SetDrive('D:','\\server\share','my share', 0)
to unmap and then map. The modification I presented employes a new ActionID value that retains the original functionality (0=map, 1=unmap & map) and adds a new function (2=unmap). This means that no prior code needs to be modified, other than changing the action code to "2" for unmaps.

Of course, now that we've seen the SetDrive code, we know that Persistence is enabled. The easiest change would be to simply insert a
 Code:
use 'D:' /delete /persistent'
to remove drives. This is why we have an option in our script to unmap all drives - start with an (almost) clean slate before mapping. Our script allows ignoring certain drive letters during the unmap process. This means that if users manually map drives to these reserved letters, they will not be affected by the login script.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D