Microsoft Excel ReadOnly User in File get value using

I am trying to find out how I can display the person that is accessing an excel file if a user of my 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?
Who is Participating?
Bob LearnedConnect With a Mentor Commented:
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.
I think you can use WMI
logoncomAuthor Commented:
what is WMI ?
logoncomAuthor Commented:
Thanks... I see many other items there that I could use as well.
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.

All Courses

From novice to tech pro — start learning today.