Advertisement
Deliverator

Untitled

May 10th, 2024 (edited)
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Define an array of applications to start
  2. $applications = @(
  3. #    "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe",
  4.     "D:\DCS-SimpleRadio-Standalone\SR-ClientRadio.exe"
  5. #    "C:\Program Files (x86)\JoyToKey\JoyToKey.exe",
  6. #    "F:\DCS World\bin-mt\DCS.exe"
  7. )
  8.  
  9. # Loop through each application
  10. foreach ($app in $applications) {
  11.     # Check if the application is already running
  12.     $running = Get-Process | Where-Object {$_.MainModule.FileName -eq $app}
  13.  
  14.     # If the application is not running, start it
  15.     if (-not $running) {
  16.         Start-Process -FilePath $app -Verb RunAs
  17.     }
  18.    
  19.     Start-Sleep -Seconds 5  # Add a 5-second delay
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement