Now, in the age of multicore systems, stopping BOINC totaly for testing seems unneeded. Moreover, it biases benchmark results cause applications under investigation operate in different environment (they own whole L2 cache that usually shared between cores). It's better to free only single core for benchmarking leaving BOINC on others.
So, my proposal is to create 2 copies of cc_config.xml file. One with <ncpus>0</ncpus> and second with <ncpus>N-1</ncpus> where N is number of cores on host.
At benchmark begin, after "net stop boinc" copy should be added to replace current cc_config.xml with edited one.
Then "net start boinc" and benchmarking.
At the end of benchmark another "net stop boinc", copy (to restore original cc_config.xml ) and "net start boinc" should replace single "net start boinc" in current benchmark.
copy destination will depend on BOINC path on your host so I don't post exact command for copy.
Sample cmd file attached.
[attachment deleted by admin]