Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ssstudio = Start-Process -filepath "C:\Windows\system32\mmc.exe" -ArgumentList '"C:\Program Files\Citrix\Desktop Studio\Studio.msc" "C:\Program Files\Citrix\Desktop Studio\LaunchConsole.exe"' -PassThru
- ## change to whatever you need to match the title of the main window for the process you are measuring
- while( $ssstudio.MainWindowTitle -notmatch 'Citrix Studio')
- {
- Start-Sleep -Milliseconds 333 ## make smaller for greater accuracy but with increased CPU
- $ssstudio = Get-Process -id $ssstudio.Id -ErrorAction Stop
- }
- [void]$ssstudio.WaitForInputIdle()
- [datetime]::Now - $ssstudio.StartTime
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement