The sample program winschedule fails when running under Vista and/or Terminal Server.
With Vista, you get the registry key error (since UAC stops it).
With Terminal Server, if in Lockdown/restricted security, it fails. Turning on relaxed security reliefs the problem.
Roger.
Fix to sample program is to remove all REGISTRY code entries.
I'm not certain that I followed this post but I can confirm that many of the samples require registry key-reading permission. The reason for this is that the locations to the databases that the samples use, along with some other things like user preferences, are stored in the registry.