Hey everyone, i'm a brand new member and first of all just want to say hey
Now onto my post. I just wanted to hopefully help out a few people that have exp'ed frustration with some programs not agreeing with our dual CPU or dual core systems.
I myself was looking for a solution to have windows automaticlly set the affinity of a program when opened. I searched these fourms for anything on affinity. While i didn't find any solution that was 100% automatic, i was able to use all the info provided and create my own solution which i'd like to share.
Using a combo of a command line program i found laying around the net, and Wintasks it is possible to have your program automaticlly set it's affinity to 1 CPU.
What you'll need...
A copy of Wintasks - not free
http://www.liutilities.com/products/wintaskspro/
A copy of process.exe
http://www.beyondlogic.org/solutions/processutil/process203.zip
here is a website that explains process.exe different functions
http://www.softpanorama.org/Unixification/windows_process_viewers.shtml
Now unfortunatly Wintasks isn't free, and only the pro version has the script engine that makes this all possible. However after reading this, possibly some of our crack coders here in the fourms could create something for free.
It is possible to write a script that will monitor for a given process name, and then do whatever you'd like. Case in point, i wrote a script to watch for mplayerc.exe and then run the process.exe to change it's affinity as soon as the program was loaded.
Step 1.
Extract process.exe - I would highly recommand dropping it into a folder that has a path set to it (system32), or adding a path in your "Environment Variables" so the system can call on the file from anywhere.
Step 2.
Install Wintasks
Step 3.
Write your scripts for whatever programs you need to run off just 1 CPU. This part is very simple, however i'll include an example.
if process_name contains "mplayerc.exe" then
start "process -a mplayerc.exe 01"
endif
VERY simple people. For those of you that don't quite understand what i've wrote there, all you need to do is paste that into the script window, and change the process name i have in quotes to whatever program your running.
Now anytime i open that media player, or if firefox or IE calls it to load it will auto set to 1 CPU and run perfectly fine. No need to minimize your programand call up task manager, or right click your exe files and select the CPU, or create bat files.
Now i want to note once again Wintasks is NOT free, and thats going to be the killer for a lot of people. I also want to note that my comment on the right click solution that one of our members came up with is not a bad solution at all. If it works for you go with it. Also the bat file solution works very well for most programs. However there are a fair amount of games out there that use a launcher, or programs that are called from say IE or firefox. A bat file in that case just won't cut it. I just thought i'd offer up another solution that takes care of it all in one shot.
If we have any coders out there, or anyone knows of another program similar to wintasks that has a scripting lang, or options to modify a process once run, please post up!!!!
Void4ever