Hi:
The problem is that when File Explorer shows the red X is because the
network share is really disconnected, so when you click on this drive then
right there it is reconnected, and that's why it works after that.
The solution is to check the connection status (you can query from CMD with
NET USE and will see a "disconnected") and if disconnected, reconnect again.
For doing this reconnection you can use CreateObject("WScript.Network") and
then use MapNetworkDrive method to reconnect the drives.
EnumNetworkDrives.count returns the number of networks shares, on which
every impair value es the drive letter and every pair value is the
corresponding share (there can be empty letters)
I'm not sure where in the registry are the mappings caches, to query this
and remap them automatically if not already connected.
Regards!
2015-05-06 15:06 GMT+02:00 Peter Cushing <[email protected]>:
> On 06/05/2015 13:44, Ted Roche wrote:
>
>> Folks:
>>
>> <snip>
>>
>> Walking through the process again, we noted a red "X" on the U: drive
>> in the explorer. Clicking on it clears the red "X" and the process
>> will work fine from there.
>>
>> Does anyone know a programmatic way to clear the red "X" and
>> re-establish the network connection? I was sure I'd see something in
>> the mailing list archives on this, but my searches didn't turn up
>> anything.
>>
>> I sometimes get this when I boot and my drive M will show a red X on it
> but if you double click it works. It seems to only happen on my laptop
> after I have used it at home then return to the office.
> Just restarted now and link is still ok.
> How was the drive originally mapped? If it was from a command prompt was
> /persistent:yes used?
> Just a WAG but has the machine got any power saving turned on and maybe it
> forgets the drive if it falls asleep.
> What happens if you try to use STRTOFILE to the U drive in this state?
>
> Peter
>
>
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/cagq_jun45cbpozngmjfisetjnejkacwzqneqftgztfnok70...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.