[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 653
  • Last Modified:

Microsoft Excel ReadOnly User in File get value using vb.net

I am trying to find out how I can display the person that is accessing an excel file if a user of my vb.net application tries to open the file that is already in use.  If an excel file is readonly, what is the syntax to get the username in the file?  I can see the info 'Acessed By' on the server in the 'Open Files' folder in the computer management console... but how do I get that information programatically?
  • 2
1 Solution
I think you can use WMI
logoncomAuthor Commented:
what is WMI ?
Bob LearnedCommented:
WMI = Windows Management Instrumentation

There are tools from SysInternals that let you find how who has a file locked.  

Windows SysInternals

You could run these files from a Process, get the output, and parse the text.
logoncomAuthor Commented:
Thanks... I see many other items there that I could use as well.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now