Well, this topic finally got my curiosity up enough to do some poking around. Using an API monitoring tool, I watched the calls being made when the clock is hidden or shown. Turns out, it's nothing more than ShowWindow, though it seems a value of 5 is used to show it. I didn't investigate why, or if it actually matters. AFAIK it's taken as a Boolean.

So I'm wondering; since you know how to change the registry setting, and you know how to show and hide the clock with ShowWindow, why not combine the two, thus achieving your goal?