Home » Questions » Computers [ Ask a new question ]

Windows Equivalent of 'nice'

Windows Equivalent of 'nice'

"Is there a Windows equivalent of the Unix command, nice?

I'm specifically looking for something I can use at the command line, and not the ""Set Priority"" menu from the task manager.

My attempts at finding this on Google have been thwarted by those who can't come up with better adjectives."

Asked by: Guest | Views: 108
Total answers/comments: 4
Guest [Entry]

"If you want to set priority when launching a process you could use the built-in START command:

START [""title""] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/WAIT] [/B] [command/program] [parameters]

Use the low through belownormal options to set priority of the launched command/program. Seems like the most straightforward solution. No downloads or script writing. The other solutions probably work on already running procs though."
Guest [Entry]

"If you use PowerShell, you could write a script that let you change the priority of a process. I found the following PowerShell function on the Monad blog:

function set-ProcessPriority {
param($processName = $(throw ""Enter process name""), $priority = ""Normal"")

get-process -processname $processname | foreach { $_.PriorityClass = $priority }
write-host ""`""$($processName)`""'s priority is set to `""$($priority)`""""

From the PowerShell prompt, you would do something line:

set-ProcessPriority SomeProcessName ""High"""
Guest [Entry]

"Maybe you want to consider using ProcessTamer that ""automatize"" the process of downgrading or upgrading process priority based in your settings.

I've been using it for two years. It's very simple but really effective!"
Guest [Entry]

from http://techtasks.com/code/viewbookcode/567