perhaps...
shell '%comspec% /c net use $DriveLetter: /d'
shell '%comspec% /c $subcmd $DriveLetter: /d'

make sure that on your test machine, you don't already have something mapped
_________________________
How to ask questions the smart way <-----------> Before you ask