Jump to content

RGT1

Members
  • Posts

    4
  • Joined

  • Last visited

RGT1's Achievements

Novice

Novice (1/7)

0

Reputation

  1. I'm executing Switch from a PowerShell script using the following code. It appears that the -hide command is being ignored. Why? I there a way to make this work? Start-Process $exe -ArgumentList @("-convert `"$SourceFile`"", "-format `"$Format`"", "-outfolder `"$TargetFolder`"", "-overwrite `"ALWAYS`"", "-settings `"$Settings`"", "-hide")
  2. My computer has 6 Cores and 12 CPUs. I have the following problem. I'm using the Switch Command-line Tool and in my situation the PowerShell script does not pause. It continues to the next line of code and that becomes a problem because an instance of Switch is already running. Ideally, I want the script to remain on the line of code until the conversion process has completed. Is there a way to address this issue?
  3. Thanks! Looks like I did the hard way. I forgot about Start-Process. & $exe -hide -outfolder $TargetFolder -convert $SourceFile -format $Format -settings $Settings -overwrite ALWAYS do { $Switch = Get-Process | Where-Object {$_.ProcessName -eq "switch"} $counter = 0 foreach ($item in $Switch) { if ($_.CPU -gt 0) { $counter += 1 } } } until ($counter -eq 0)
  4. I'm launching Switch within a Microsoft PowerShell script. When the script launches Switch with the parameters passed to it, it runs fine. However; the script continues to the next line of code. How do I make the script wait until Switch has completed its process before continuing to the next line of code in the PowerShell script?
×
×
  • Create New...