Tracy,

Not sure if you're still having trouble with this, but I wrote a VFP 
chunk of code that uses Windows Scripting when the appropriate error is 
triggered. The code (with WScript) checks for the "missing" drive map, 
removes it if it is known to exists (because it will be dead) and then 
reconnects the link. It has helped a lot.

Here it is in case anyone else can use it.
This is  part of my error handling routine.

para tnErrorNo
IF tnErrorNo=1 OR tnErrorNo=1104
     * network drive has gone away
     oNet = CreateObject("WScript.Network")
     * get list of mapped drives
     * this will return an object with an array property "item"
     * Item is a zero-based associative array of "drive letter" = "map path"
     * so loDrives.item(0)= 'Z:'
     *    loDrives.item(1)= '\\192.168.0.25\c\'
     loDrives=oNet.enumnetworkdrives()
     IF loDrives.count>0
         FOR nnum=0 TO loDrives.count STEP 2
             IF lodrives.item(nnum)='S:'
                 * force removal in case it exists
                 oNet.RemoveNetworkDrive("S:",.t.)
                 exit
             ENDIF
         ENDFOR
     ENDIF
     RELEASE ALL LIKE loDrives
     * reconnect.....the third param is for "persist? y or n"
     oNet.MapNetworkDrive("S:", appl.serverpath,.t.)
     RELEASE ALL LIKE onet
     On Error &lcError
     retry
ENDIF

Mike Copeland

Tracy Pearson wrote:
> Network drives keep disconnecting.
> Foxpro tables are on Network.
> All XP workstations do not have a problem.
>
> SMB 2 on server is disabled, Tweaks on W7 box for network card sleep set,
> Tweaks for auto-disconnect of drive turned off on server.
>
> Where can I send this customer to keep the network from dropping the mapped
> drive?
>
> In leaving the computer sit while in a remote helpdesk connection (both I
> and the user see the screen), the mapped drive actually dropped from Windows
> Explorer when we opened it after a few minutes.
>
> I saw VMWare workstation do this on my own box when I had a VMworkstation
> started with NAT instead of bridged. But this isn't the case for this
> customer.
>
> Any thoughts?
>
> Thanks
> Tracy
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** 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.

Reply via email to