Tracy's code is great, but if you want to unmap a drive you can do this with:
net use f: /delete /y
Then map to the drive with:
net use f: \\servername\sharename /user:username password
These batch commands will work in Windows2k or XP and even in '98 if you do some property settings changes to disallow Windows from detecting the network.
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright