Microsoft has added new security features surrounding mapped drive usage in Windows 2008. Previously, with Windows 2003, we could utilize mapped drive not only from Windows explorer but also from the command line. Now, we can continue to map a network drive from Windows explorer; however, command line applications and batch scripts no longer have access to the mapped drive. No worries... there is a workaround. In order to utilize mapped drive from command line, we must take the following steps:
- Map network drive (net use b: \\computername\drivename)
- Execute scripts or application
- Disconnect mapped drive (net use b: /delete)
It must be noted that the above mentioned steps may need to get split into individual files for the entire process to be successful.