mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-17 18:27:42 -06:00
Compile Winutil
This commit is contained in:
parent
f130fc6c49
commit
3c2b236d0a
@ -13864,10 +13864,14 @@ Add-Type @"
|
|||||||
"@
|
"@
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
||||||
if ($proc.Id -ne [System.IntPtr]::Zero) {
|
# Check if the process's MainWindowHandle is valid
|
||||||
|
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
||||||
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
||||||
$windowHandle = $proc.MainWindowHandle
|
$windowHandle = $proc.MainWindowHandle
|
||||||
|
} else {
|
||||||
|
Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user