Reputation: 653
Does anyone know how I would force the computer to update the time with the time server, you can do this manually doing: Right Click on time -> Adjust date/time -> Internet Time -> Change Settings -> and update now.
I want to write a program that incorpates that same functionality, but does it automaticly.
Any suggestions?
Darestium
Upvotes: 5
Views: 1665
Reputation: 72616
You can write directly in the windows registry from your program, the interested key is :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
Reference here .
To learn how to read, write into the windows registry from your C# applications, take a look at this example .
Upvotes: 3