Advertisement

10.31.2007 at 12:27PM PDT, ID: 22930792
[x]
Attachment Details

Set System Time on Windows Vista

Asked by fisc in .NET, Microsoft Visual Basic.Net, Windows Vista

Tags: vista, system

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.TimeOfDay = 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
[+][-]10.31.2007 at 01:12PM PDT, ID: 20188710

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.31.2007 at 01:19PM PDT, ID: 20188759

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2007 at 02:14PM PDT, ID: 20189112

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Microsoft Visual Basic.Net, Windows Vista
Tags: vista, system
Sign Up Now!
Solution Provided By: jcoehoorn
Participating Experts: 1
Solution Grade: A
 
 
[+][-]10.31.2007 at 03:10PM PDT, ID: 20189456

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.31.2007 at 04:11PM PDT, ID: 20189859

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.01.2007 at 06:18AM PDT, ID: 20192526

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.01.2007 at 06:47AM PDT, ID: 20192794

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628