Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Topic on User talk:Macgovern

Force CPU affinity command prompt method undo edit

7
Radishface (talkcontribs)

Command prompt method modifies the executable permanently, and the change persists between restarts. I've verified this myself locally. Not sure why my change was undone.

Macgovern (talkcontribs)

I don't know how you 'verified' this, but the start command does not and cannot make permanent changes. Furthermore, you cannot assign core affinity to a folder - hence why a second command-line prompt appears. Thus, what you are experiencing is a placebo, or in other words, perceiving no change as a change.

Radishface (talkcontribs)

Here's how I've verified it: 1. Open the Command Prompt. 2. Type in the following command: Start /affinity 0xE "<path-to-game-exe>" and press Enter. 3. Wait until the second Command Prompt window pops up with it's path changes to <path-to-game>. 4. Launch the game via the executable file. 5. Alt-tab back to the Desktop, and open the Task Manager. 6. Go to Details view, and search for the game process. 7. Right-click on the process > Set Affinity. 8. Verify that only the CPU 0 is checked. 9. Repeat steps 4-8 after the restart. You are right about one thing - you cannot set affinity to a folder. Looking back at my previous edit, I wasn't clear that users would need to paste in the path to the executable, and not the folder.

Macgovern (talkcontribs)

On a whim, I tested the results exactly as stated, and not only did it fail to set the affinity for the executable, nothing changed on restart.

As such, I have no reason to continue this conversation further as I've seen too many "works on my machine" posts like this.

Aemony (talkcontribs)

> 3. Wait until the second Command Prompt window pops up with it's path changes to <path-to-game>.

Feel free to provide screenshots showcasing this, because all that a command such as 'start /affinity 0xE "H:\tmp\derp\SKIF.exe"' does on my system is open a new cmd process with the title of "H:\tmp\derp\SKIF.exe". It neither affects the game executable nor changes current working directory of the CMD window to the folder that the game executable was located in.

So if I'm in C:\ and run that command, the new CMD process opens in C:\ as before, but just with the title of the path to the game executable.

You can see a recording of it in action here (notice the title of the tab of the new cmd window that spawns): https://cdn.discordapp.com/attachments/326048443040530432/1145832355592929411/explorer_2023-08-28_23-28-00.mp4

Radishface (talkcontribs)

Seems like I'll need to do some more testing myself to make that the result I've got is not a one-off. Thanks for testing on your end both of you. I'll update the thread if I'd discover something new.

Macgovern (talkcontribs)

You're welcome. I apologize for curtness earlier - the users who claim things which shouldn't work usually believe, falsely, that they are always right and that we at PCGamingWiki are always wrong for denying them no matter what the reasons. You are clearly not one of those users, and I apologize for making that assumption.

Also, while you're performing your re-testing, I would recommend testing it on the latest game you have. Windows, as part of Microsoft's remarkable dedication to backwards compatibility, has a massive built-in compatibility database which automatically applies various application and game-specific fixes as needed - including automatic core affinity assignment. Making matters more complicated is, in my experience, these fixes can also be automatically applied by developers who are re-releasing older games, such as those from Steam or GOG.com. Newer games built in an era when multi-core processors are the norm usually don't need Microsoft or the developer to step in with a core affinity fix, so those will be the most reliable test games.