IF you can't trust the CMOS battery, then you need to get the time from the internet. There are a number of internet time servers which you can use: Google can help you, just look for NIST or NTP servers.
Setting the system clock though is a privileged operation - which means you need admin permissions to do it. The code is simple:
http://msdn.microsoft.com/en-us/library/ms172517(v=vs.90).aspx[
^] - but it may be more of a PITA that you want.
Me? I'd change the battery - they aren't expensive and old leaky batteries can do serious damage to the PCB!