Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

File in Use

Posted on 2006-11-05
8
Medium Priority
?
159 Views
Last Modified: 2010-04-30
When a file is in use (.xls, .txt., .vbs. .exe, etc...), how can I see who has the file open?  My OS is Win XP Pro.
0
Comment
Question by:CCIG2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 28

Accepted Solution

by:
Ark earned 1500 total points
ID: 17879381
Private Sub Command1_Click()
   Dim WMI, wmiProcesses, proc, sOwner, sDomain
   Set WMI = GetObject("winmgmts:\\")
   Set wmiProcesses = WMI.InstancesOf("Win32_Process")
   For Each proc In wmiProcesses
      proc.GetOwner sOwner, sDomain
      Debug.Print proc.Name, "Owner: " & sDomain & "\" & sOwner
   Next
End Sub
0
 
LVL 10

Expert Comment

by:cool12399
ID: 17879388
0
 
LVL 1

Expert Comment

by:ThijsM
ID: 17887514
Perhaps you could use the following tool.  I couldn't find any code about this issue:
http://www.dr-hoiby.com/WhoLockMe/index.php

0
 

Author Comment

by:CCIG2006
ID: 18092705
My wife has recently passed away and I am trying to take care of everything.  Please allow an extension so athat I can review the answers within the next 2 weeks.  Your cooperation and understanding would be greatly appreciated.

Thank you kindly,
Mike.
0
 

Author Comment

by:CCIG2006
ID: 18381605
My wife has recently passed away and I am trying to take care of things.  I have not had time to review the answers, so I ask that you please allow more time.

Your cooperation is greatly appreciated.

Thank you,
Mike
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question