Compile Winutil

This commit is contained in:
ChrisTitusTech 2024-05-11 20:53:18 +00:00 committed by github-actions[bot]
parent f130fc6c49
commit 3c2b236d0a

View File

@ -13865,9 +13865,13 @@ Add-Type @"
}
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)"
$windowHandle = $proc.MainWindowHandle
} else {
Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)"
}
}