Set AFFINITY of a game


  1. Posts : 211
    Windows 7 Ultimate x64
       #1

    Set AFFINITY of a game


    I have searched a lot but couldn't find the command to set the affinity of a process that is already running.

    All the examples i came across are to start a program with desired affinity but none showed how to change the affinity of a program already running.

    For example i have notepad.exe running and i want it to use only core 2 and three. What cmd command can be used for that
      My Computer


  2. Posts : 2,468
    Windows 7 Ultimate x64
       #2

    In task manager, in the processes tab search the process. The context menu contains a "set affinity" option that allows to chose which CPUs will run that program.
      My Computer


  3. Posts : 2,047
    Windows 7 Home Premium 64-BIT
       #3

    ^ Normal way.

    But he asked for a command prompt parameters so he wouldn't do that everytime.

    Try these:

    Set affinity with start /AFFINITY command on Windows 7 - Stack Overflow

    or

    Start an Application Assigned to a Specific CPU in Windows 7, 8, or Vista
      My Computer


  4. Posts : 211
    Windows 7 Ultimate x64
    Thread Starter
       #4

    RoasterMen said:
    ^ Normal way.

    But he asked for a command prompt parameters so he wouldn't do that everytime.

    Try these:

    Set affinity with start /AFFINITY command on Windows 7 - Stack Overflow

    or

    Start an Application Assigned to a Specific CPU in Windows 7, 8, or Vista

    Thanks for the link but again these are to start a program with defined affinity not to set the affinity of a program thats already running
      My Computer


  5. Posts : 2,047
    Windows 7 Home Premium 64-BIT
       #5

    Well, unfortunately there isn't one.
      My Computer


  6. Posts : 211
    Windows 7 Ultimate x64
    Thread Starter
       #6

    RoasterMen said:
    Well, unfortunately there isn't one.
    O There is to set a priority but none there to set affinity i should goto microsoft then !
      My Computer


  7. Posts : 2,468
    Windows 7 Ultimate x64
       #7

    NirCmd can do this. One of its multiple options precisely involves sets the CPU affinity of existing processes:
    NirCmd Command Reference - setprocessaffinity
      My Computer


  8. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #8

    Okay folks I'm lost again.
    With beret21 system specs, why would one want to do such a thing?
      My Computer


  9. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #9

    PowerShell can set a process' affinity. See SO answer.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:21.
Find Us