ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > T-Clock

T-Clock 2010 (download)

<< < (18/169) > >>

If i had any idea this was going to be so much work (for you) i never would have asked for it, regarding registry settings, etc.
i'm really not sure it is worth the effort pursuing.

My request was predicated on the assumption that tclock could simply invoke the built in internet time sync that is part of every windows installation in the Date and Time Properties dialog.. Or even just bring up that dialog and let me click "Update Now" in the built-in windows dialog.  I was just looking for a menu command in the right click menu that would save me a few clicks to bring up that built-in time-sync function.

Stoic Joker:
LOL ... You weren't the first (or the only one) to inquire about it. ;)

The sticking point is that setting the time in Windows (Vista/7/etc.) requires administrative rights and/or a UAC prompt acceptance (All roads lead to the SetSystemTime(&NewTime) function). So regardless of what I do with the code, I either have to require the program be run with administrative rights, or saddle the user with UAC prompts ... Which will result in the program being run with administrative rights. That, of course would violate one of the core design requirements that I set forth back in 06 (come to think of it, it was more like 03 when I started the project).

Fortunately, I like a challenge. :) So I cooked up this little scheme which allows the time to be quickly sync'ed from an administrative command prompt - which I'm guessing most of us tend to frequently run and/or keep handy. It's kind of a Power User Easter Egg if you will...

The primary question, at this point, is whether or not this scheme fits your definition of an acceptably convenient solution to (time Sync) problem X?? ...If it does, I'll continue flushing it out with a UI for server & logging configuration etc..

my main pc is still xp pro, so i don't have UAC prompts here :)

however, on the other win7 machine..

if you are saying the procedure is:
1. set reg key manually
2. Navigate to the TC2010 with an Administrative Command Prompt and run Clock /Sync This will partially load a 2nd (hook-less) copy of TC2010 that will synchronize the time with the selected NTP Server and then exit.

then i regret to say it but i'd much rather bring up the adjust date/time dialog in windows and navigate and click on the Update Time button.  it's hard for me to envision a scenario where i think it would make sense for you to write your own time sync code with your own configuration of time servers..  maybe i'm not the normal user for this, but if i'm running this once per week or month, i have no problem at all dealing with a UAC prompt for such a thing.. but more significantly, i just dont see why you should have to implement this yourself, it seems like a clear case to me where the cleanest solution is to just bring up the built-in windows time sync dialog and let MS handle the issues involved in configuring a time server, etc.

Stoic Joker:
ROFL ... Now you know where I was at when the question first arose ... By default Windows XP, Vista, & 7 all auto sync with every 7 days - which was (a large) part of the justification for dropping the feature to begin with.

But I too have a thing about time ... So I continued to entertain the possibilitys... And Kazubon wrote the time sync code back in 95. Hence with a (slightly major) revamp of the socket handling code it wasn't really difficult to put back in - Where & how were the tricky parts. That and If I make it available to anyone, it has to be available for everyone, including the folks who are running (my all time favorite OS) Windows 2000. So... (hehe) ...Here we are.

The feature isn't at all finished, as I still have to add an auto-prompt for preferred NTP server if none is configured, and I'm just hoping to glean some input on what else (if anything) to add to it, to make it as user friendly as possible - without compromising security.

Tangential note...

The Windows keys do not work reliably because they're a reserved System Key.
-Stoic Joker (April 07, 2010, 05:40 PM)
--- End quote ---
I was just reading about RegisterHotKey:

The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident.
--- End quote ---
I noticed that the latest T-Clock 2010 doesn't allow F12 to be registered :)

BTW, do you know of a good list of reserved keys?  What I've found so far is:


[0] Message Index

[#] Next page

[*] Previous page

Go to full version