w10install/scripts/modify-timeservers.cmd

41 lines
1.3 KiB
Batchfile
Raw Normal View History

2022-12-11 21:46:12 +01:00
@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 1>nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
/v "2" /t REG_SZ /d "ptbtime2.ptb.de" /f 1>nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
/v "3" /t REG_SZ /d "ptbtime3.ptb.de" /f 1>nul
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 1>nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
/v "5" /t REG_SZ /d "1.europe.pool.ntp.org" /f 1>nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
/v "6" /t REG_SZ /d "2.europe.pool.ntp.org" /f 1>nul
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^
/v "7" /t REG_SZ /d "3.europe.pool.ntp.org" /f 1>nul
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 #######