Depends on what you are willing to do:
Method 1: On demand
Use ImageCFG. This utility will let you setup an executable to run on any number of cores. Make sure you backup your target executable before making the changes and restore it when you are done playing with it.
Method 2: Force an entire Windows Session (Vista/7)
- Type
bcdedit /set onecpu on on a command prompt
- Reboot the system.
- When you are done playing, type 2 - Type:
bcdedit /set onecpu off and reboot again.
Method 2: Force an entire Windows Session (XP)
- Open your boot.ini file (Right-click My Computer -> Properties -> Advanced Tab -> Settings button under 'Startup and Recovery' -> Edit button in 'System Startup').
You'll find the following (or similar) section in the file:
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
Change it by adding the /onecpu flag:
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /onecpu
Reboot. Once you are done playing remove the flag and reboot again.
Method 0: Not a good method (Processor Affinity)
Anything that otherwise involves Processor Affinity isn't a good option, I'm afraid. Processor affinity is a clue to the processor. The processor is not obliged to respect it, and often will not.