Advertisement
Guest User

Untitled

a guest
Sep 6th, 2024
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $totalTime = Measure-Command {
  2. Start-Process -FilePath "C:\Path\Path\Path\Desktop\Ninite.exe" -Wait
  3. tasklist /fi "windowtitle eq Ninite*"
  4. }
  5.  
  6. $minutes = [math]::Floor($totalTime.TotalMinutes)
  7. $seconds = [math]::Floor($totalTime.TotalSeconds % 60)
  8. $milliseconds = $totalTime.Milliseconds
  9.  
  10. Write-Output "Time for installation is ${minutes} minutes, ${seconds} seconds and ${milliseconds} milliseconds."
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement