Check out the learning series where we just dealt with writing binary strings to the registry.
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=168694&an=0&page=0#168694

But the primary thing is to get rid of the commas