I have a client-server application and I need for the clocks on each to be in sync with each other. So I am attempting to get the server's time and then set the client's clock to match it. This works fine except on Vista thanks to my new enemy UAC.
Whenever I run the command to set the local clock (Microsoft.VisualBasic.Tim
eOfDay = ServerTime) it gives me a permission denied error. I even tried another way of setting the clock via some system dll call I found online, but this generates another error about protected memory.
If I run my application as an administrator, it works fine. But I can't expect my users to always do that (and if you set it up to always run that way it asks you to confirm each time before the application starts This is a very annoying problem. And I'm about to suggest everyone just turn UAC off but that's not a good solution obviouslly.
Please help!
Start Free Trial