| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Windows/diagnostics/system/Audio/ |
Upload File : |
# Copyright � 2008, Microsoft Corporation. All rights reserved.
function SyncInvoke([string]$executable = $(throw "No executable is specified"), [string]$arguments, [bool]$isHidden = $false)
{
[int]$timeOut = 60000
[System.Diagnostics.ProcessStartInfo]$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = $executable
$startInfo.Arguments = $arguments
$startInfo.UseShellExecute = $true
if($isHidden)
{
$startInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
}
else
{
$startInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Normal
}
[bool]$result = $false
[System.Diagnostics.Process]$process = $null
try
{
$process = [System.Diagnostics.Process]::Start($startInfo)
$result = $process.waitforexit($timeOut)
}
finally
{
if(-not $process.HasExited)
{
$process.Kill()
}
}
return $result
}