Copy imagecfg.exe to %systemroot%\system32 (or C:\Windows\system32), and %systemroot%\system32\dllcache (or C:\Windows\system32\dllcache). Doing so will make imagecfg a system command.
This tool only works on NT based operating systems (Windows NT, 2000 Family, XP Family, 2003 Family, Vista).
It will work on Multiprocessor machines and Uniprocessor machines with HyperThreading Technology (and multicore processors).
I was unable to find any documentation for this tool on Microsoft's website.
To use this tool to set affinity masks for an executable, type the following command in a command prompt window or run dialog:
imagecfg -a 0x1 c:\path\to\file.exe
If the above didnt work, try typing the following:
imagecfg -u c:\path\to\file.exe
imagecfg -a 0x1 c:\path\to\file.exe

--------------------------------------------------
These tools are also handy to have:
How to Install and Use the Interrupt-Affinity Filter Tool
IntFilt is also included in the Windows Server 2003 Resource Kit Tools (Also works with XP)