MooglePower Posted September 9, 2010 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!
MooglePower Posted September 9, 2010 Author Posted September 9, 2010 Got it! I mapped drives over the old ones with fake credentials. Seems to wipe out the old ones well. :-)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now