AFAIK, detaching doesn't actually abort the tasks. Rather, they just get abandoned and until the timeout on the server they don't get resent. If you want to do that, why not use boinccmd.exe to abort the task. Does BT allow you to send the WU name to the script?