Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if VPN is connected

Status
Not open for further replies.

ali32j

Technical User
Apr 23, 2007
97
GB
Hi All

Is it possible to check if access to a VPN protected server file location available? i.e that the user has connected VPN, if not to stop the code and issue a warning?

Thanks

Ali
 
A quick and easy way would be to check for the existence of a known file. If there are no known files and you have write permissions, you could try to write a temporary file and if successful, delete it.

I have a similar situation, not with a VPN, but with a removable drive. I keep a file named "DoNotDelete.Me" on the root of the drive. If I can access that file, I know the drive is connected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top