The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,613 other followers

check if network connection is permanent

Posted by jpluimers on 2017/11/22

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: [WayBackSaveConnections 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+


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: