General information
Category:
Windows API functions
George
>Remembered drives are just that. In order to reconnect one or more of them you have to use the WSH or one of the WNetAddConnection family of API calls.
I see I've caused confusion by the wording of my original post. It wasn't until I explored this that I learned the correct word is "remembered" but that is the situation I was so badly trying to explain.
I *think* I outta to start a new thread with a better subject, or just tell my client to open Explorer and click on the drive. *s*
Anyway, just to follow up on these suggestions. From the docs, WNetRestoreConnectionW, which you suggested, would seem to be exactly what I want. Here's the text that makes me think so?
WNetRestoreConnectionW is used by Winlogon to restore all persistent drive mappings during the interactive logon process. The function is also called by the Microsoft Windows Shell to reconnect individual drives at the user's request. This can occur, for example, when a drive fails to reconnect at logon and the user double-clicks the drive under the My Computer virtual folder.
> I've got a kludge (by Ed's standards, BTW)of a function that enumerates the remembered drives using WNetOpenEnum() and so on. If you'd like I can post it for you.
Enumerating is one thing, "activating" the connection is another so that's it's available under GETDIR(). I think I might just automate Explorer at this point. (Talk about your kludges.)
BTW, just FYI. WScript.Network.EnumNetworkDrives won't enumerate remembered drives. (Q303209)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only