ZTree.com  | ZEN  | About...  

 Index   Back

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

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

> > 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?
Is does here, so something else.

If you can see the UNC but not access via the drive letter, then something else is going on.
That links to a very old ZEP for ZTree to fully support UNC's, but the coding for that would need some design changes, which would cause issues.

> 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.

After you have done the dir command, can ZTree then access the drive? Probably not because of the "Unavailable" message you are seeing.

Which means your options are
Use Windows Explorer to wake up the drive(s).
Disconnect and reconnect the drive(s)
ZEP for ZTree to wake up drives in a similar way to Windows Explorer


The "Also working from home here, but over Citrix." comment was a social comment in these difficult times.

Ben

165 views      
 

Messages in this Thread

 
95,065 Postings in 11,983 Threads, 350 registered users, 122 users online (0 registered, 122 guests)
Index | Admin contact |   Forum Time: Aug 4, 2020 - 7:29 pm EDT  |  Hits:32,848,784  (36,051 Today )
RSS Feed