ZTree.com  | ZEN  | About...  

 Index   Back

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

By: Ben Kent       
Date: May 01,2020 at 22: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

898 views      
Thread locked
 

Messages in this Thread

 
96,631 Postings in 12,230 Threads, 350 registered users, 75 users online (0 registered, 75 guests)
Index | Admin contact |   Forum Time: Mar 19, 2024 - 3:35 am UTC  |  Hits:62,006,956  (4,237 Today )
RSS Feed