>>>Is it possible to programmatically change the system time ?
>>>is it possible to get the time of another PC ?
>>>
>>>Thanks again
>>
>>Alessio,
>>See my FAQ about this. It's under the WIN32API & Other APIs section. However, the machines must be NT (workstation or server). The API functionality is not supported under Win9X.
>
>I was thinking to run a program in background which wrote the system time in a
>file, so that the other machines could read it and upgrade their time
>through it.
>Do u think it could work ?
There's almost no chance of getting it this way, because the time written in the file is static. The easiest thing to do is to have the local system create a temporary file on the server and immediately read it's creation time - the timestamp for the file uses the server machine's time, so you adjust the time on the local workstation to match the server's time.