User manual
Command line options
LockHunter can be used from the command line using the following syntaxis:
LockHunter.exe [/unlock] [/delete [/delperm]] [/kill] [/silent] [/exit] [file_or_folder_path]
- file_or_folder_path - the path to a file, a folder or a leading part of
the path. E.g. K:, C:\Program Files, C:\Docume.
- /unlock or -u - unlocks the file_or_folder_path. It closes all
handles to the files\folder that starts from file_or_folder_path and
unloads .dlls which are residing in the files\folder that starts from file_or_folder_path.
- /delete or -d - unlocks and deletes the file_or_folder_path. If
file_or_folder_path is a partial name of a path (e.g. "c:\Docu" is a partial
name of "C:\Documents and Settings"), all the files and folders that starts
from file_or_folder_path will be deleted. Note, if there's processes launched from
file_or_folder_path they will prevent to delete the folder\file. Use /kill
parameter to forcibly terminate such apps.
- /delperm or -dp - an optional parameter for /delete
asking the program to delete the file_or_folder_path permanently
bypassing the recycle bin. Use it only with /delete
parameter, e.g. LockHunter.exe /delete /delperm c:\somefile.exe
- /kill or -k - terminates all the apps which are launched from
file_or_folder_path. If file_or_folder_path is a partial name of a path (e.g. "c:\Docu" is a partial
name of "C:\Documents and Settings"), all the processes which launch paths start
from file_or_folder_path string will be terminated.
- /silent or -sm - no GUI will be displayed. The program
starts in silent mode, does one of the passed commands (e.g. /unlock) and terminates.
- /exit or -x - exits automatically when all actions are done.
This option might be required only when you wish to see the GUI, all displayed
warnings but do not wish to press the button "exit" manually.
Notes:
- In case of error (e.g. a file cannot be deleted) the program returns non-zero
error code, otherwise it returns zero exit code. Find list of error codes here:
0 | - operation completed successfully, a file was deleted or unlocked |
1 | - cannot delete or unlock a file |
2 | - technical error occured while processing operation |
- If the file_or_folder_path part of command line is not specified all other options will be ignored.
- There's no need to use /unlock and /delete commands at the same time since /delete does unlocking and deleting the specified file or folder path.
- /kill can be used with both /unlock and /delete
commands in order to terminate processes launched from file_or_folder_path if
any. Beware you may loose your data if a killed program contain unsaved information when use this option!
Portable version
The portable version is supplied in form of installer and it can be installed to
an external drive (or even to a cloud drive) and then be used on any computer.
What are the differences between portable and installable verions:
- The portable version stores the settings (LockHunter.ini) and the log file
in the folder of its executable
- The portable version doesn't integrate into Explorer (right click menu
"What's locking this file")
- In order to unlock, delete or rename a file with a portable version you
must run the program from the flash drive. Just browse "LockHunter Portable"
folder and launch LockHunter32.exe or LockHunter64.exe depending on what OS
type you have (32 or 64 bit, nowadays it's 64 bit).
Note! The portable version still requires administrative permissions.
Frequently Asked Questions
What is "More details" checkbox for?
It is aimed to display more details about the process, such as "Process Id" and command line startup parameters.
By default we do not display such information so that the program looks as much simple as possible.
LockHunter cannot unlock some file\folder, what to do next?
At the moment LockHunter can only unlock a file\folder if there's
a process opened connection to this file or folder. However there are other
reasons why you cannot delete your file:
- The file is an integral part of the operating system and cannot be deleted without damage to the system
- There are incorrect symbols in the path to the file
- The file\folder has an incorrect access rights. Check your user account has rights to delete\change the file or folder
- The file system is damaged
Perhaps in future LockHunter will also manage some of the mentioned causes of file blocking but it will never be a magic wand
that can delete any file on your system. If some file cannot be deleted stop and think if you really need this file get deleted?