Question Locked

How can I perminently run a program with affinity set to one core?

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi guys,

I want to know how I can perminently run a program with a certain affinity setting that has not been installed, it's saved in a custom folder. I heard it was possible with a shortcut or batch command made with notepad. I don't know exactly how to do this with a .exe file that has not been installed.

To make a long story short: I need to perminently run a simple utility on one CPU core. How can I do this?

Thanks in advance.

8 replies

by wompai

... I downloaded the file and put it in the System32 map. Then I put this code: imagecfg -u "C:\Users\Ryan\My Documents\Example.exe" in notepad. And saved it as a batch file and cmd file. Both don't work and the program doesn't start. Can you help me?

by seanferd

does the system know where to find imagecfg? (Can you put imagecfg in the Run box and have anything happen?) If not, the full path might be necessary.

by seanferd

The processor core numbering starts with 1 for this command.

So, for your batch/cmd file or shortcut, using the first core in this example:

cmd /C start /affinity 1 "C:\Users\Ryan\My Documents\Example.exe"

This is Windows Vista or 7 32 or 64 bit? (Just for possible future reference if you continue to have difficulty.)

by wompai

and by ''slightly'' I mean:

The shortcut works but CMD pops up and I have to type "example.exe" in cmd, then it starts my program. It does run it on one core, though. It works but it's not entirely perfect.

It's Win7 x64 btw.

by .martin.

you stuck the ImageCFG file in %systemroot%\system32 and %systemroot%\system32\dllcache

then ran imagecfg -a 0x1 "C:\Program Files (x86)\ExampleProgram\Example.exe"

I would run this command in an Administrative Command prompt (open start, type cmd in search, right click cmd, select run as administrator )

then you should be able to just run the program as normal.

This discussion is closed to new replies.