Thanks Uwe for the below code!
I was in a situation of a batch file running from a Task Scheduler that got broken because the user suddenly turned on persistent network connections.
So I needed to check if a shared drive-letter was indeed persistent or not and act accordingly.
The below code helped me merging the batch file with the Delphi application it would run in the background anyway.
It’s way better than checking of the global “persistence” flag for new connections has been set in the registry: [WayBack] SaveConnections flag at HKCU\Software\Microsoft\Windows NT\CurrentVersion\Network\Persistent Connections
(which is reflected both in the Windows UI and settable via net use /Persistent
).
Source: check if network connection is permanent
Via: [WayBack] Anyone who can share how one can query if a drive letter mapping to a share is persistent across logon sessions? (yes, this is Windows, I know) – Jeroen Wiert Pluimers – Google+
–jeroen
Read the rest of this entry »
Like this:
Like Loading...