How can I query the connection state of Cisco Anyconnect 2..5x with access vba

I am looking for vba code that I can use in MS Access at startup, and determine if a user is attempting to start an access tool over CISCO VPN vpn.

I found some code that tells me if I am a LAN, but that code does not tell the difference between VPN or LAN.  Access, on the other hand, let's us know very quickly, the difference.  A user attempting to connect on VPN will be disallowed.

Possibly, a registry key that indicates an active status, using the MSscripting library?  Problem is, I am far from a  cisco expert, and cannot locate any such registry entry in this version fo the VPN software.

Thanks!
MrAutomateAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

 Here's some code that will poll the current adapter in use for various settings.  One you could look at is the adapter name.

Jim.
MACAddress-PollAdapter.zip
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MrAutomateAuthor Commented:
Jim,

Thanks for this.  I have tested from my LAN connected desktop, and it works without issue.  

However, when connected to my laptop, via the CISCO vpn software listed above, the code causes ACCESS to crash every time, when it gets to the adapter name section, which I was hoping would be the very section that would help me identify if it was not a lan connection.  Any thoughts on code tweaks that might correct this?
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<the code causes ACCESS to crash every time, when it gets to the adapter name section, which I was hoping would be the very section that would help me identify if it was not a lan connection.  Any thoughts on code tweaks that might correct this? >>

  Sorry but no.  The code has worked fine wheneve I've used it.  Is the laptop running the same OS or something different?

Jim.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

MrAutomateAuthor Commented:
JIm,

Same OS, however, encrtion is present on the Laptops hard disk, if that matters.  I suspect the VPN client might cause the crash when / if polled.  Is that possible?
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

  Maybe, although I have used that on machines with different VPN clients and never had an issue.  Of course I haven't used that code all that often, so I can say with certainty it works in all cases.

Jim.
0
MrAutomateAuthor Commented:
Jim,

Thanks.  Tried other laptops, same issue, fails at the same point.  Let me go ahead and get you the points, you were responsive, and gave a cool solution,even though it did not work for our laptops.
0
MrAutomateAuthor Commented:
This is good code for detailing LAN connection information, although it did nto seem to work on HP laptop with encrypted hard disks, running windows XP, and Cisco any connect vpn clients.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.