If you don't want an error thrown when trying to delete an non existent drive, check for its existence first. Better still, why go to DOS for the NET command when KiX has the USE command.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.