mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-05-23 15:57:24 -05: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*" })) {
|
||||
if ($proc.Id -ne [System.IntPtr]::Zero) {
|
||||
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
||||
# 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)"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user