This is executed once after the computer boots (with a 30 second delay). That’s it. You were right earlier, programs to inherit process affinity and therefore, Steam and GOG inherit explorer’s affinity and as a result games do. (They also do when you start them through a desktop shortcut.)
There is no need for polling, unless you insist on various different affinity settings.
I also think you’ve made a mistake. On my 2700X system my default affinity is 0xFFFF, not 0xFFFF, because auf SMT. Hence, on your PC your default affinity should be 0XFFFFFFFF, shouldn’t it (16c/32t)?
I just wanted to inform everyone here that the script above might cause issues with some programs.
To be more specific in this case, I was unable to play Vampyr with its process affinity set to 65532. As a result, there might be other programs that cause issues.
Thanks for the info. After not touching it for over six years (stuck at the last level of Portal), I just reinstalled Steam last night, and if I’d added it to the script and then the games started crashing I’d have gone nuts* trying to figure it out.
- same thing happened to me with Vampyr. It actually took quite a while until I figured it out. (What complicated matters was that it worked about 1 out of 50 times)