[SOLVED] Batch file to change affinity of a running Windows process

JoshRC

Honorable
Jun 21, 2015
227
2
10,865
61
So I have an issue that constantly occurs and the only way to fix it is changing the cpu affinity to "cpu 2" and the priorty to high. Its a little annoying to have to go into task manager every time and change it manually when i want to use the program and then itll swhich them back randomly. So I was trying to figure out how to make a batch file i could run instead.

I pretty sure this would be how to change the priority: wmic process where name="ProcessName" CALL setpriority ProcessIDLevel
But I have no clue how to change the affinity, so im hoping someone here might know?

The process is audiodg.exe and its a windows process that runs at start up so if would have to be able to change it while the process is running which im not sure is even possible to be honest.

Thanks!
 
You could use a tool like process lasso or the free process hacker you can definitely change the priority and save it and it will always apply if the program is running, I'm not that sure about if affinity will change automatically each time if you save it but you will be able to change it while it's running.

BUT you should look into why you have the problem in the first place and it does look a lot like a driver issue.
 

JoshRC

Honorable
Jun 21, 2015
227
2
10,865
61
You could use a tool like process lasso or the free process hacker
I have tried this but yeah, i can only find programs that change the priority but nothing to change affinity, which doesnt fix the issue.
BUT you should look into why you have the problem in the first place and it does look a lot like a driver issue.
I probably should have said but i already know know why its happening. Its and audio codec issue, basicly whenever i speak to someone on discord they hear constant static. I asked discord support and they said that proprietary audio codecs that discord uses dont play well with my 3rd party audio program voice meeter, its a common problem and theres no fix aside from the affinity and priority change. I was a bit sceptical at first so i got in contact with the support for voice meeter and they said the same thing discord support did without me even mentioning i had spoken to them. So unfortunatly i dont think i can really do anything else beside not using discord or voice meeter :(
 

ASK THE COMMUNITY

TRENDING THREADS