Windows 10: Starting Application With Affinity

Discus and support Starting Application With Affinity in Windows 10 Software and Apps to solve the problem; Greetings Windows 10 1909 I would like to start an application setting its affinity and priority. I currently have several applications setup to... Discussion in 'Windows 10 Software and Apps' started by gfd, Dec 9, 2019.

  1. GFD
    gfd Win User

    Starting Application With Affinity


    Greetings

    Windows 10 1909

    I would like to start an application setting its affinity and priority.

    I currently have several applications setup to run from a batch file with high priority. The batch file to run with high priority is as follows:

    start "" "F:\My Music\Program Files\Programs\folder\foo.exe"

    TIMEOUT 5

    wmic process where name="foo.exe" CALL setpriority 128

    exit

    That works for most applications. Where it doesn't, I run the program with the /high argument and delete the wmic line in the batch file. NOTE: obviously, I have changed the application name and its immediate containing folder Starting Application With Affinity :)

    Anyway, I have looked on several sights to learn how to set the affinity of the application on startup, from a batch file. Nothing seems to work. I am sure I am doing something wrong. I created a batch file to run the program using the first 2 cores. Based on what I read regarding affinity, I setup the batch file this way:start "" /affinity 0x2 "F:\My Music\Program Files\Programs\program\foo.exe"TIMEOUT 5

    wmic process where name="foo.exe" CALL setpriority 128

    exit

    When I run this, the program opens. I check task manager: right click the process, go to details, right click then click on priority and it is set to high as expected. Then I click on set affinity. All cores are checked (not what I want). What I typed in the batch file did not deactivate any cores.

    Could anyone show me how to setup a batch file that would set the affinity and the priority? If you can, please do it with a program like notepad.exe and any filename, so that I could see it work.

    Thanks for reading this. Thanks for your help.

    Graham

    :)
     

  2. Affinity Photo Reinstall

    Hello,

    Thank you for writing to Microsoft Community Forums.

    Follow the below mentioned steps to install Affinity Photo:

    1. Open the Windows Store app from the Start menu.

    2. Sign in with the Microsoft account through which you made the purchase.

    3. Search for Affinity Photo in the search bar.

    4. Select the Affinity photo application from the search result.

    5. Click on Install button to install the application.

    Hope it helps.

    Let us know if you got the help you needed by clicking "Yes or No".

    Harish

    Microsoft Community – Moderator
     
    Harish_kum, Dec 9, 2019
    #2
  3. Application Processor Affinity Problem

    Excellent! While the problem is solved, that is a very useful article. Thank You! Funny thing is, I'm frequent visitor to SevenForums and never crossed paths with that page.
    Ruled out the hardware as no other programs are being affected in such a way.
     
    lexluthermiester, Dec 9, 2019
    #3
  4. Yolvi Ell Win User

    Starting Application With Affinity

    CPU / CPU Processor problems / Processor affinity

    We appreciate the information you provided. Your processor is working as expected. CPU affinity is only showing CPU (0) since 1 processor is working at the moment. It's very likely that your computer is using a balanced power plan, so we suggest changing
    your power plan to High Performance by following these steps:

    • Right-click Start.
    • Click Power Options.
    • Choose High Performance.

    In addition to that, we recommend installing the latest updates to keep your system current and secure. Go to
    Start > Settings > Update & Security > Check for updates.

    Some programs may also be automatically launching whenever you boot your computer, affecting the performance. To disable them, follow these steps:

    • Right-click your taskbar.
    • Click Task Manager.
    • Under the Startup tab, find the programs that you don't need.
    • Right-click the program and choose Disable.

    You're also using your computer for a game that was designed to run on an earlier version of Windows, so it's possible that it's slowing down your computer. In this case, use the Compatibility Troubleshooter to find and fix problems with the program using
    these steps:

    • Click Start.
    • Type Troubleshooting and press Enter.
    • Click Run programs made for previous versions of Windows.
    • Click Next.
    • Choose the program from the list and click Next.

    Let us know if you need further assistance with your computer.
     
    Yolvi Ell, Dec 9, 2019
    #4
Thema:

Starting Application With Affinity

Loading...
  1. Starting Application With Affinity - Similar Threads - Starting Application Affinity

  2. Set back CPU affinity to default for an application

    in Windows 10 Gaming
    Set back CPU affinity to default for an application: Hello !I have encountered an issue with a game recently. It was originally designed for a Windows XP SP3 and I'm currently trying to run it on Windows 11. Unfortunately, it kept crashing at various moments with nos real pattern, so I started to dig around for a fix. At some...
  3. Set back CPU affinity to default for an application

    in Windows 10 Software and Apps
    Set back CPU affinity to default for an application: Hello !I have encountered an issue with a game recently. It was originally designed for a Windows XP SP3 and I'm currently trying to run it on Windows 11. Unfortunately, it kept crashing at various moments with nos real pattern, so I started to dig around for a fix. At some...
  4. Windows Server 2022 - Setting affinity in .NET 6 application errors

    in Windows 10 Gaming
    Windows Server 2022 - Setting affinity in .NET 6 application errors: Hi,I have a Windows Server 2022 machine with 40 cores and 80 logical processors. Whenever I try and run my application on this machine and attempt to set it's affinity in code or via Task Manager, I get errors.The error I get in code is: Win32Exception 87: The parameter is...
  5. Windows Server 2022 - Setting affinity in .NET 6 application errors

    in Windows 10 Software and Apps
    Windows Server 2022 - Setting affinity in .NET 6 application errors: Hi,I have a Windows Server 2022 machine with 40 cores and 80 logical processors. Whenever I try and run my application on this machine and attempt to set it's affinity in code or via Task Manager, I get errors.The error I get in code is: Win32Exception 87: The parameter is...
  6. Automatic/scripting changing processor affinity on an already running application?

    in Windows 10 Gaming
    Automatic/scripting changing processor affinity on an already running application?: HiI am looking to see if there is a way to change the processor affinity on a running application.Maybe by using bat, python or the likes to launch the parent application and subsequently change the affinity.Here is the basic problem:I have App-A, that is started manually...
  7. Automatic/scripting changing processor affinity on an already running application?

    in Windows 10 Software and Apps
    Automatic/scripting changing processor affinity on an already running application?: HiI am looking to see if there is a way to change the processor affinity on a running application.Maybe by using bat, python or the likes to launch the parent application and subsequently change the affinity.Here is the basic problem:I have App-A, that is started manually...
  8. Automatic/scripting changing processor affinity on an already running application?

    in Windows 10 Customization
    Automatic/scripting changing processor affinity on an already running application?: HiI am looking to see if there is a way to change the processor affinity on a running application.Maybe by using bat, python or the likes to launch the parent application and subsequently change the affinity.Here is the basic problem:I have App-A, that is started manually...
  9. affinity level CPU

    in Windows 10 Customization
    affinity level CPU: I have a program that starts running too much CPU usage. The last time this program did this it was on an over the top 36 core something or other laptop, I like to call it the Unicorn laptop. To solve the issue I set the affinity level down to 8 cores from task manager...
  10. Starting Application With Affinity

    in Windows 10 Support
    Starting Application With Affinity: Greetings Windows 10 1909 I would like to start an application setting its affinity and priority. I currently have several applications setup to run from a batch file with high priority. The batch file to run with high priority is as follows: start "" "F:\My...