Setting affinity\priority at startup?

Recommended Posts

oozma 0

oozma 0

I have some pretty basic knowledge of writing scripts for autoit but I haven't done anything like this before.

I'm looking to make something that will set a specific process to run off only 1 core and real-time priority whenever I open the program. Is it possible to somehow write a sript for this and link it to the program's .exe to automatically do this every time it's opened?

If so, can anyone point me in the right direction to learn how? Thanks!

Share this post

Link to post

Share on other sites

oozma 0

oozma 0

Thanks, I've seen that but I mean is there a way to automatically have this done without having to run the script after opening the program? Something like 'merging' I guess the script with the exe, or having the exe execute the script by itself?

Share this post

Link to post

Share on other sites

PsaltyDS 27

PsaltyDS 27

Your "merging" would be "infecting with code" by many people's definition. Leaving that aside:

There's no need to launch the app directly first. It might be no different than running it via a batch file. Run the AutoIt script, which will in turn launch your app and change the processor affinity mask for the resulting process.