NewEraCracker
Active Member
Click in the clock with the right mouse button and select Adjust date/time, then go to the Internet Time tab, hit Change settings and Update now. If it works, we can proceed.
Create a file with the following contents in C:\sync-clock.php
Run Computer Management ( compmgmt.msc ) from Control Panel > System and Security > Administrative Tools.
Go to Task Scheduler Library and Create a Basic Task with When the computer starts as Trigger.
Action will be to Start a Program, Input the path to your php executable (php.exe) in Program/Script.
Add Arguments: -n -f "C:\sync-clock.php"
After task is created, edit its properties:
Change User or Group and type SYSTEM, then confirm
Tick Run with highest privileges
Confirm the changes.
Create a file with the following contents in C:\sync-clock.php
PHP:
<?php
// Attempt resync
system('w32tm /resync', $return_var);
while( $return_var !== 0 )
{
// Sleep to avoid excessive looping
sleep(10);
// Attempt resync
system('w32tm /resync', $return_var);
}
// Successful exit
exit(0);
?>
Run Computer Management ( compmgmt.msc ) from Control Panel > System and Security > Administrative Tools.
Go to Task Scheduler Library and Create a Basic Task with When the computer starts as Trigger.
Action will be to Start a Program, Input the path to your php executable (php.exe) in Program/Script.
Add Arguments: -n -f "C:\sync-clock.php"
After task is created, edit its properties:
Change User or Group and type SYSTEM, then confirm
Tick Run with highest privileges
Confirm the changes.
Last edited: