ZTree.com  | ZEN  | About...  

 Index   Back

[OT] Reconecting mapped network drives on VPN after sleep   [OT]

By: Peter Shute       
Date: May 01,2020 at 18:23
In Response to: [OT] Reconecting mapped network drives on VPN after sleep (Ben Kent)

> Call :WakeupPath \\server\share1
> Call :WakeupPath \\server\share2
>
> goto :eof
> ::_____________________________________________________________________________
> :WakeupPath
> If Exist %1 goto :eof
> Call :Log Waking up %1
> dir "%~1\$$$$$$$$.$$$" >nul
> If Not Exist %1 (
> timeout /t 30
> goto WakeupPath
> )
> goto :eof
> --- end ---

So basically running dir \\server\share1\$$$$$$$$.$$$ can "wake" it?

I tried it, and the dir command finds the share immediately, but the net use command still lists it as "Unavailable". Your script would jump to :eof immediately, as the share is already available via UNC. Access to the mapped drive is the problem.

> The other methods
> 1. Use Windows Explorer to wake up the drive(s).

That's what I've been doing.

> 2. Disconnect and reconnect the drives
> net use d: /d
> net use d: \\server\share1

That works for me.

> Also working from home here, but over Citrix.

So you're running these commands on a remote machine?

164 views      
 

Messages in this Thread

 
95,078 Postings in 11,987 Threads, 350 registered users, 26 users online (0 registered, 26 guests)
Index | Admin contact |   Forum Time: Aug 14, 2020 - 10:25 pm EDT  |  Hits:33,126,672  (26,434 Today )
RSS Feed