Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to force a Windows mapped drive to refresh
QtWS25 Last Chance

How to force a Windows mapped drive to refresh

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 5.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dancingbeartech
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      "QProcess":http://doc.qt.nokia.com/4.7/qprocess.html , net.exe and the appropriate "commands":http://www.computerhope.com/nethlp.htm

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved