MooglePower 0 Posted September 9, 2010 I'm currently using DriveMapAdd and DriveMapDel to map and unmap drives. Unfortunately, this doesn't remove credentials. Therefore, I wrote in the following to make sure that the credentials are removed after a drive is unmapped: Run(@ComSpec & " /c " & 'net use * /delete /yes', "", @SW_HIDE) I also set the following at the beginning of the script: Run(@ComSpec & " /c " & 'net use /persistent:no', "", @SW_HIDE) Unfortunately, there's about a 15 second delay between the disconnecting and net use command and the credentials actually getting deleted. Therefore, if a user were to run the script and therefore unmapping the drive, they still have about 15 seconds in which they can access files on the mapped drives. If they do so during this time, it "sticks" and they keep the ability to access the mapped drive. Is there anything in the DriveMapAdd function that will specify a "don't save credentials" sort of option? Is there another way of handling this? This is mission critical. Thank you! Share this post Link to post Share on other sites
MooglePower 0 Posted September 9, 2010 Got it! I mapped drives over the old ones with fake credentials. Seems to wipe out the old ones well. :-) Share this post Link to post Share on other sites