How to force a Windows mapped drive to refresh
General and Desktop
2
Posts
2
Posters
5.1k
Views
1
Watching
-
wrote on 13 Aug 2011, 17:26 last edited by
I'm looking for a programmatic way to force a Windows mapped drive to refresh. It is configured to reconnect at log-on, but if the drive is not available, it won't be connected. If it becomes available at a later time, the user can open the drive from Windows Explorer and it'll repair the connection. Is there a way to do this programmatically? It doesn't have to be cross platform per se, but a Qt way if one exists would be handy.
I found WNetRestoreConnection, but it is removed from Windows Vista and above, and I'm writing on Windows 7 right now.
Thanks in advance.
Andrew -
wrote on 13 Aug 2011, 17:49 last edited by
"QProcess":http://doc.qt.nokia.com/4.7/qprocess.html , net.exe and the appropriate "commands":http://www.computerhope.com/nethlp.htm
1/2