RE: Reconnect autodisconnected drive mappings

From: Mark (Mark_at_discussions.microsoft.com)
Date: 11/01/04


Date: Mon, 1 Nov 2004 11:45:02 -0800

Take a look at WNetGetConnection.
Why bother with network drives? You should be able to do the same think
using the path name (\\server\folder).

Mark

"Michael Russell" wrote:

> I have a small app that needs to access network shares mapped to local
> drive letters. The problem is that the pc it runs on (WinXP sp1)
> doesn't get used very often, so the shares get auto-disconnected by the
> server.
>
> The workaround thus far has been for the user to open Explorer and click
> on each mapped drive letter to force Windows to reconnect. This isn't
> very convenient, however.
>
> The share URI is contained in a database. I've considered using
> WNetAddConnection2/WNetCancelConnection2 to create temporary shares that
> exist as needed for my program; this would also get around times when
> the share is accidentally removed.
>
> Having said all that, my specific question is: How can I determine what
> persistent connections exist on a PC, and reconnect them as needed?
> BTW, this needs to work on all flavors of Windows >= 95. If it matters,
> I'm using VC++ 7.
>
> Thanks,
> Michael
>



Relevant Pages

  • RE: Could Not Reconnect all Network Drives
    ... "Could not reconnect all network drives" error when they re-logon to the ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Windows XP Network Drfive Mapping
    ... > Is there a policy or registry key that prevents a user from ... AFAIK, no globaly key. ... Because this reconnect setting ist specified ... all network drives and then connect them with /persistent:no ...
    (microsoft.public.windows.group_policy)
  • Disconnected Network Drives after boot
    ... It apparently tries to reconnect my ... network drives BEFORE the network is stabilized. ... if %errorlevel% equ 0 goto getR ...
    (microsoft.public.windowsxp.network_web)
  • Network Drive reconnect at logon
    ... I set up a couple network drives while connected to my ... but I accidentally left the "Reconnect at ... everytime I start up I get an ... reconnected" because I haven't logged back in to the VPN ...
    (microsoft.public.windowsxp.network_web)
  • missing network drives
    ... I have a problem with windows 2000 machines not ... the mapped network drives do not ... network drives the option to reconnect at login is ... I also have a logon script mapping these drives ...
    (microsoft.public.win2000.networking)