2023-03-07 12:28:00 -08:00
|
|
|
function Get-WinUtilInstallerProcess {
|
|
|
|
|
<#
|
2023-10-19 17:12:55 -05:00
|
|
|
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Checks if the given process is running
|
|
|
|
|
|
|
|
|
|
.PARAMETER Process
|
|
|
|
|
The process to check
|
|
|
|
|
|
|
|
|
|
.OUTPUTS
|
|
|
|
|
Boolean - True if the process is running
|
|
|
|
|
|
2023-03-07 12:28:00 -08:00
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
param($Process)
|
|
|
|
|
|
2024-08-06 23:35:17 +03:00
|
|
|
if ($Null -eq $Process) {
|
2023-03-07 12:28:00 -08:00
|
|
|
return $false
|
|
|
|
|
}
|
2024-08-06 23:35:17 +03:00
|
|
|
if (Get-Process -Id $Process.Id -ErrorAction SilentlyContinue) {
|
2023-03-07 12:28:00 -08:00
|
|
|
return $true
|
|
|
|
|
}
|
|
|
|
|
return $false
|
2024-08-06 23:35:17 +03:00
|
|
|
}
|