[ACCEPTED]-Identify process using a file-wmi
You can use handle.exe from Sysinternals.
Something like:
> handle /accepteula C:\path\to\directory
...
program.exe pid: 1234 type: File 2E4: C:\path\to\directory
...
Thanks to https://stackoverflow.com/a/599268/367916 .
0
You could use Process Explorer from Microsoft
- Download & unpack & run Process Explorer
- Click Find menu and then click Find Handle or DLL... or press CTRL + F
- Copy and paste path to locked folder of file
- Click Search, you can kill process from main Process Explorer window
0
If you can limit yourself to new enough 2 versions of Windows, the Restart Manager 1 can tell you which process has a particular file open.
Because of the way Process Explorer works, I 5 suspect that what you need to look for is 4 a way of finding the file handles attached 3 to a given process, and that you'll have 2 to pull that list for each process in the 1 system and look for your file within it.
I don't know in Windows, but somebody might 4 find useful to know that, in Linux, you 3 can use the lsof command, or just search through 2 the folders /proc/PROCESS_ID/fd and see 1 what process has opened the file.
This article might be helpful to you.
It appears 3 you are forced to search through the list 2 of files for each process on the system 1 using undocumented functions in ntdll.dll.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.