WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

24 Feb 2017, 05:24

For me (Win10) the TrayIcon just flickered like crazy but show nothing...
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

14 Aug 2017, 17:18

Has anyone fixed the stuck at 25%/33% issue? Or provided a fix to ignore any problems and proceed anyway?

qwerty12, here:
WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 99#p133899

provided 2 interesting links:
Discussion: HOWTO: Enumerate handles - Sysinternals Forums - Page 10
https://forum.sysinternals.com/discussi ... age10.html
HOWTO: Enumerate handles - Sysinternals Forums
https://forum.sysinternals.com/howto-en ... 18892.html

Thanks.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

17 Aug 2017, 11:07

I managed to get it to work on my Windows 7 PC, with the following fix: I ignored a process called ThpSrv.exe.

There is also code below to log all the PIDs that have been checked so far, in order to identify the PID that caused the crash, which you could look up in Task Manager. Note: in Task Manager 'click on Show processes from all users'.

Code: Select all

;add this code just after: Loop %HandleCount% {

;==============================
;WhoLockedMe fix:
vPID := SHI[A_Index, "PID"]
vPathLog = %A_Desktop%\z WhoLockedMe log.txt

;to log each PID to identify the PID were the crash occurred:
if !(vPIDLast = vPID)
	FileAppend, % vPID "`r`n", % "*" vPathLog

;to retrieve the path for a PID in order to skip certain processes:
if !(vPIDLast = vPID)
{
	oWMI := ComObjGet("winmgmts:")
	oQueryEnum := oWMI.ExecQuery("Select * from Win32_Process where ProcessId=" vPID)._NewEnum()
	if oQueryEnum[oProcess]
		vPPath := oProcess.ExecutablePath
	oWMI := oQueryEnum := oProcess := ""
}

vPIDLast := vPID

if InStr(vPPath, "ThpSrv.exe")
	continue
;==============================
Btw I ran a test where I edited the script to not force it to run as Admin, it still works and retrieves a lot of files, but some are omitted.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
joedf
Posts: 8986
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

18 Aug 2017, 13:35

Wow cool! I haven't seen this. Does this still work?
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

30 Jan 2019, 19:10

Working fine for me with AHK_L 1.1.30.01, 64-bit, Win7 Pro 64-bit. No issues so far (using latest version of script from OP).
Bruttosozialprodukt
Posts: 463
Joined: 24 Jan 2014, 22:28

Re: WhoLockedMe - Reveal processes locking files / blocking ports and release them with a simple click

21 Feb 2019, 16:17

Sorry for the super late response. Unfortunately I stopped using Windows and proprietary software in general a long time ago.
Since AHK doesn't run on Linux, there is not a lot of motivation for me to maintain my AHK scripts. But it's great to hear that it works for at least some of you and that you went through the hassle of tracing down that freezing issue!
Maybe I'll come back to this project one day when I got a proper gpu passthrough vm running.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Insaid, ntepa and 108 guests