Determining the Process Locking a File

How to Identify the Application with a Handle on a File

Applies to YSoft SafeQ 5 and YSoft SafeQ 6.

Occasionally, conflicts arise when accessing files. For instance, updating YSoft SafeQ to a newer version might fail if a third-party application locks YSoft SafeQ files.  It is recommended to terminate the application before retrying the update. Common culprits are backup software or security applications.

Resolution:

Imagine the update is failing as the exclusive lock to files in C:\SafeQ6\FSP\Service\Spooler 6.0.49.1 directory cannot be obtained. Two approaches described below are among the most effective ones.

Task Manager

  1. Run Task Manager (e.g. Windows + R → type in taskmgr → press Enter)
  2. Go to tab Performance → click Open Resource Monitor
    image2021-1-27_10-33-42
  3. In the Resource Monitor switch to tab CPU → find the section Associated Handles and type in the name of file or folder you are interested in
    • by typing in spooler you will find any handles for files that are stored in a directory having this name
      image2021-1-27_10-34-59

If you cannot find what locks your files, it is best to double-check the situation with a Process Explorer. Process Explorer seems to provide a bit more information in some situations.

Process Explorer

  1. Download application at Microsoft - Process Explorer
  2. Run the application
  3. In the upper menu choose Find → Find Handle or DLL...
  4. Type in the name of file or folder you are interested in and press Search
    • by typing in spooler you will find any handles for files that are stored in a directory having this name
      image2021-1-27_10-29-50