Sign in to follow this  
Followers 0
oozma

Setting affinity\priority at startup?

4 posts in this topic

Hey guys,

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



#2 ·  Posted (edited)

_WinAPI_SetProcessAffinityMask()

See help file.

:(

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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

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.

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0