Setting "Affinity" in batch AFTER program has launched

Jan 1, 2019
Hi people and Happy New Year to everyone here at Tom's Hardware :D

Hope you all had a Good Christmas !

So on to the Meat and Veg of this thread ....

I've recently been playing a game called Vampyr by Dontnod and honestly the game is pretty fantastic but its PC port is kind in a sorry state when it comes to multi threading and Ryzen CPU's.

You may or may not have heard but the game goes into a "Not responding" state at 10% loading and has nearly 3x the loading time when uses on a Ryzen CPU, this can be worked around by setting the affinity to use core's 0,2,4,6. I shall show you an example below.

This is a GIF of the loading time on a full affinity Ryzen 2700 @ 4.1ghz

This is a GIF of the loading on the same CPU with the affinity set to 0,2,4,6

As you can see it's a pretty big speed up, and this is on a small loading area if you die in the city with full affinity the loading can take up to 3 mins.

Now here is the issue I am facing, after playing the game for about 25/30 hours im started to get a little tired of every time im loading the game setting the cores. So I thought I would make a bat file to do it for me:

Start /affinity 55 Vampyr-Win64-Shipping.exe

55 Being core 0+2+4+6
and this works but ... the game crashes on launch unless it has all cores activated ...... ... yeah I know ....

So is there a way I can set the affinity AFTER the game has launched via bat. I did try something like this but I had no luck.

Start Vampyr-Win64-Shipping.exe
Timeout /T 20
/affinity 55