Windows 8 and 8.1 Forums


CPU Affinity Shortcut for a Program - Create in Windows

  1. #20


    Posts : 6
    Windows 10 64bit


    It's a quad core and I want it not to use cpu 0. So it would be 1110. Which gave me an E.

      My System SpecsSystem Spec

  2. #21


    Posts : 6
    Windows 10 64bit


    After trying everything, this worked.
    cmd.exe /c start "Sonar Platinum" /affinity E "C:\Program Files\Cakewalk\SONAR Platinum\sonarplt.exe"

    I had to leave the quotation marks on. Go figure, after so many years of every instruction telling me "without quotes"

    Thank you though. It works. Here's to hoping it helps with my problem.
      My System SpecsSystem Spec

  3. #22


    Posts : 22,279
    64-bit Windows 10


    Great news.

    Yeah, whenever there's a space in the path, you'll usually need to wrap it in quotes.
      My System SpecsSystem Spec

  4. #23


    Posts : 6
    Windows 10 64bit


    Can I add administrator privileges to the program as well?
      My System SpecsSystem Spec

  5. #24


    Posts : 22,279
    64-bit Windows 10


    Sure you can. You could use OPTION SIX in the tutorial below to set the shortcut to always "Run as administrator".

    Run as Administrator - in Windows 8
      My System SpecsSystem Spec

  6. #25


    Posts : 52
    windows 8.1 and server 2012 R2


    Quote Originally Posted by Brink View Post
    Hello mariachipr, and welcome to Eight Forums.

    Please go ahead and post the command you used for the shortcut's location to see if anything may be wrong with it.
    hey Brink sory bringing up back an old thread. the shortcut works great for launching application rather than launch application -> task manager -> manually change affinity.

    however, what if say I wish to change affinity while a software/program already launched is there anyway to use a shortcut to still adjust the affinity for that currently running program without having to use task manager and manually change it? basically im looking to toggle different affinities with a running software without having to end process and relaunch it.

    this might seem silly but i have many uses for it, to maximize my hardware performance due to software being unoptimized to take full advantage of my cpu. examples below:

    using Broadwell-E CPU which has turbo max 3.0, it allow me to adjust frequency say 1 core at 5ghz while all core load at only 4ghz, when unoptimized software running on 1 core capable of using the highest frequency I set, works well with software that ONLY uses 1 core/thread. however in case I have a software which is semi-optimized, sometimes uses all cores, sometimes only uses 1 or 2 cores/threads, I want to be able to toggle affinities while software running under different scenarios to take advantage highest frequency possible.
      My System SpecsSystem Spec

  7. #26


    Posts : 22,279
    64-bit Windows 10


    Hello m18xr2,

    Here's a command you can use to change the CPU affinity of a running process.

    wmic process where name="ProcessName" CALL setpriority ProcessIDLevel



    Example:
    wmic process where name="calc.exe" CALL setpriority 32768
    or
    wmic process where name="calc.exe" CALL setpriority "above normal"


    ProcessIDLevel
    idle: 64
    below normal: 16384
    normal: 32
    above normal: 32768
    high priority: 128
    real time: 256
      My System SpecsSystem Spec

  8. #27


    Posts : 52
    windows 8.1 and server 2012 R2


    Quote Originally Posted by Brink View Post
    Hello m18xr2,

    Here's a command you can use to change the CPU affinity of a running process.

    wmic process where name="ProcessName" CALL setpriority ProcessIDLevel



    Example:
    wmic process where name="calc.exe" CALL setpriority 32768
    or
    wmic process where name="calc.exe" CALL setpriority "above normal"


    ProcessIDLevel
    idle: 64
    below normal: 16384
    normal: 32
    above normal: 32768
    high priority: 128
    real time: 256
    ty for quick respond, this is changing priority though but not changing affinity during a process, is it possible to change to different affinity while a process is already running without task manager and just use of a shortcut or CMD line?
      My System SpecsSystem Spec

  9. #28


    Posts : 22,279
    64-bit Windows 10




    Doh. Sorry about that. The site below has a PowerShell script that you can use as a .bat file or command line. Hopefully it may work for what you're wanting.

    batch file - Change affinity of process with windows script - Stack Overflow
      My System SpecsSystem Spec

Page 3 of 3 FirstFirst 123
CPU Affinity Shortcut for a Program - Create in Windows
Related Threads
How to Create a Shortcut to Run an Application with a Specific CPU Priority in Windows Windows shares the processor time between all running processes based upon their priority level. If a process has a higher priority, it gets more processor time compared to a process having a lower priority....
How to Create a "Facebook" App Shortcut in Windows 8.1 The Facebook app for Windows 8.1 is now available to download in the Windows Store. With Facebook for Windows 8.1, you get direct access to your Facebook News Feed right from your Start screen where you can stay connected with your...
How to Create a Calculator App Shortcut in Windows 8.1 The Calculator app included in Windows 8.1 is a simple yet powerful app that includes a standard calculator, a scientific calculator, and a unit converter. Whether you’re using it to add up a bill, convert a recipe, or complete algebra,...
How to Create a Reader App Shortcut in Windows 8.1 The Reader app is included in Windows 8.1 by default and helps you open and view PDF, XPS, and TIFF files. Reader lets you search for words or phrases, take notes, fill in forms, and print or share documents. For more information, see: ...
How to Create a Photos App Shortcut in Windows 8 and 8.1 The Photos app is included by default in Windows 8 and brings all of your pictures and home movies together in one place - even if they're on Facebook, Flickr, OneDrive, or another PC. For more information, see: Photos app for Windows...
How to Create a "Switcher" Shortcut in Windows 8 and 8.1 This tutorial will show you how to download and use a "Switcher" shortcut that opens directly to the Switch List bar to easily switch between opened Metro apps, Metro screens, and desktop in Windows 8, Windows RT, Windows 8.1, and...
How to Create a "Run" Command Dialog Box Shortcut in Windows 8 This tutorial will show how to create or download a Run shortcut that opens directly to the Run command dialog box on your desktop in Windows 8. The default keyboard shortcut to open the "Run" command dialog box is: Windows + R ...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook