@echo off

echo ####### %0 #######

echo adding PTB time servers ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "1" /t REG_SZ /d "ptbtime1.ptb.de" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "2" /t REG_SZ /d "ptbtime2.ptb.de" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "3" /t REG_SZ /d "ptbtime3.ptb.de" /f


echo adding EUROPE ntp pool servers ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "4" /t REG_SZ /d "0.europe.pool.ntp.org" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "5" /t REG_SZ /d "1.europe.pool.ntp.org" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "6" /t REG_SZ /d "2.europe.pool.ntp.org" /f

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
  /v "7" /t REG_SZ /d "3.europe.pool.ntp.org" /f


echo stopping time service ...
sc stop W32Time 1:3:3 1>nul

echo setting time service to automatic start ...
sc config W32Time start=auto

echo starting time service ...
sc start W32Time

echo ####### %0 #######

