Does anyone know of a way (specific to 7zip or general) to limit the CPU usage of 7zip while it is archiving a long list of files? OS is Windows Server 2008 R2, and 7zip is run via command line from a batch file.

link|improve this question

40% accept rate
feedback

2 Answers

Don't worry about the actual CPU percentage, instead you should start the process using a different priority. So from the command line you should be able to use start /low command to start a command that only runs the system is IDLE.

link|improve this answer
Great, thanks... – UpTheCreek May 10 '11 at 18:15
feedback

If you are working in powershell you can do something like this:

$start = New-Object System.Diagnostics.ProcessStartInfo
$start.Arguments = "--argument1 --argument2"
$start.FileName = "C:\bin\7zip.exe"
$proc = New-Object System.Diagnostics.Process
$proc.PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal
$proc.StartInfo = $start
$proc.Start().WaitForExit()
link|improve this answer
Thanks. I'm not currently using powershell, but am thinking of updating the old batch files to it. – UpTheCreek May 10 '11 at 18:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.