Re: Map A drive when it is not connected

Tech-Archive recommends: Fix windows errors by optimizing your registry



Ben wrote:
We are currently in the situtation where we need to map a drive for
a remote user using a script when the drive is unavailable. Both
of the below scripts error when this is done:

Batch:
Net USE S: \\servername\folder

VB Script:
Set objNet = CreateObject("Wscript.Network")
objNet.MapNetworkDrive "S:", "\\servername\folder"


Is there any method of mapping the drive so that it is ready when
it is connected.

Other than persistently (successfully) mapping it once - no.

--
Shenan Stanley
MS-MVP
--
How To Ask Questions The Smart Way
http://www.catb.org/~esr/faqs/smart-questions.html


.