How To Start an Application on a Specific CPU and Priority

Running a program on a specific CPU or using a diffrent priority can be very useful. But Windows offers no obvious way to allow you to have a program open up with those settings automatically.

Luckily there is a command you can use adhoc or in a batch file to automate this task. Read on to find out how

Instructions

  • Click Start and then Run (In XP)
  • or Start then type run in the search box and enter (In Vista/7)
  • Enter the following command
start /affinity 2 /abovenormal notepad.exe

Lets Break that command down into steps

  • Start (Needed) Tells cmd you want to start a program
  • /affinity 2 (Optional) This is the CPU or Core that you want it to run on (See details below)
  • /abovenormal (Optional) This is the priority of the
  • notepad.exe (Needed) This is the program to be run (Use the full filepath and enclose in quotes)

Affinity

If you right click on a process in task manager you can see the numbers of the CPUs you can use. You need to add 1 to this number in the command. (You can also use this to check if your command worked. As only the CPU you selected will be ticked)

Process Affinity

Priority

These are the commands to adjust the priority of the program (I would suggest not using realtime it can cause problems)

/Realtime
/High
/Abovenormal
/Normal
/Belownormal
/Low

Leave a Reply