Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Forums > Gaming

Vista - Setting processor affinity made easy

Reply
 
Old 12-14-2008   #1 (permalink)


Vista 32
 
 

Setting processor affinity made easy

While dual core and quad core processors are a great advance in processing power, many games in XP and Vista run better on a single core. Need for Speed Underground is one such game. In my search to find an easy way to set processor affinity, I found the easy method outlined below. This method is the best I've found and actually WORKS without having to make system-wide changes.

Enjoy!

Here's a tip I use for some games which have problems with dual core. It saves the trouble of [alt][tab] out of the game each time, and I find it easier than creating a batch file. You may have already seen this, if so, the short answer is written in red at the bottom of this post.....

Affinity and priority can be permanently added to an application's shortcut so that you don't have to change it every time you run it.

To begin, create a shortcut to the game on the desktop.

Right click the shortcut and select properties. In the "shortcut" tab, find the line for "target". Copy this in front of the target: C:\Windows\System32\cmd.exe /C START "Need for Speed Undercover" /high /affinity 1. Now, NFS Underground will automatically run in high priority on Core 0.

Here's an example for the game Tombraider Legend which also balks at dual core processing.




The target line originally looks like this:
  • "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    So I change it to this:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
The affinity can be set to any CPU core by changing the number to the corresponding hex value.
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = 10 ( hexadecimal 16 )
6th core = 20 ( hexadecimal 32 )

The priority can have any value of either: low, normal, high, realtime, abovenormal, belownormal.



So to run on only the 4th core at high priority you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 8 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    or to run on the 2nd AND 3rd cores with priority realtime you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /realtime /affinity 6 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe" (Since 2+4=6)
Sometimes if the game needs to be run as administrator, then you get an error from not starting in the correct folder. Then also add:
/d "<directory>"
The end result being:
C:\Windows\System32\cmd.exe /C START "Tomb Raider" /d "C:\Program Files (x86)\Tomb Raider - Legend" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"

Finally, you just need to change the icon since this will set it to the CMD icon. From the same window, click "change icon" then browse to the location of the exe.
And if you need to run as admin, click the advanced button and check the box"run as administrator"

My System SpecsSystem Spec
Old 01-12-2009   #2 (permalink)


Vista Ultimate 64-bit
 
 

Re: Setting processor affinity made easy

Thank you so much! This works great on old games like Raganarok and Age of Empires.
My System SpecsSystem Spec
Old 01-12-2009   #3 (permalink)


Vista Home Premium x64
 
 

Re: Setting processor affinity made easy

Quote  Quote: Originally Posted by Tiberius Jonez View Post
While dual core and quad core processors are a great advance in processing power, many games in XP and Vista run better on a single core. Need for Speed Underground is one such game. In my search to find an easy way to set processor affinity, I found the easy method outlined below. This method is the best I've found and actually WORKS without having to make system-wide changes.

Enjoy!

Here's a tip I use for some games which have problems with dual core. It saves the trouble of [alt][tab] out of the game each time, and I find it easier than creating a batch file. You may have already seen this, if so, the short answer is written in red at the bottom of this post.....

Affinity and priority can be permanently added to an application's shortcut so that you don't have to change it every time you run it.

To begin, create a shortcut to the game on the desktop.

Right click the shortcut and select properties. In the "shortcut" tab, find the line for "target". Copy this in front of the target: C:\Windows\System32\cmd.exe /C START "Need for Speed Undercover" /high /affinity 1. Now, NFS Underground will automatically run in high priority on Core 0.

Here's an example for the game Tombraider Legend which also balks at dual core processing.




The target line originally looks like this:
  • "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    So I change it to this:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
The affinity can be set to any CPU core by changing the number to the corresponding hex value.
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = 10 ( hexadecimal 16 )
6th core = 20 ( hexadecimal 32 )

The priority can have any value of either: low, normal, high, realtime, abovenormal, belownormal.



So to run on only the 4th core at high priority you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /high /affinity 8 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"
    or to run on the 2nd AND 3rd cores with priority realtime you would put:
  • C:\Windows\System32\cmd.exe /C START "Tomb Raider" /realtime /affinity 6 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe" (Since 2+4=6)
Sometimes if the game needs to be run as administrator, then you get an error from not starting in the correct folder. Then also add:
/d "<directory>"
The end result being:
C:\Windows\System32\cmd.exe /C START "Tomb Raider" /d "C:\Program Files (x86)\Tomb Raider - Legend" /high /affinity 1 "C:\Program Files (x86)\Tomb Raider - Legend\trl.exe"

Finally, you just need to change the icon since this will set it to the CMD icon. From the same window, click "change icon" then browse to the location of the exe.
And if you need to run as admin, click the advanced button and check the box"run as administrator"
or if you got a Nvidia Graphics card, you could just turn threaded optimization off.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
I made a big mistake on setting acct.! HELP! Vista mail
Which processor setting is better? General Discussion
Processor Affinity Tutorials
Unable to set processor affinity for a game. Vista Games
Vista Taskmanager Processor Affinity error Vista installation & setup


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46