@echo off

set EXE=..\software\nettime-setup.exe
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"

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

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

echo disabling systems time service ...
sc config W32Time start=disabled

echo installing NetTime ...
start /wait %EXE% /SILENT

echo disabling autoupdate ...
reg add "HKLM\Software\Wow6432Node\Subjective Software\NetTime" ^
  /v "AutomaticUpdateChecks" /t REG_DWORD /d "0" /f >nul

echo moving NetTime startmenu shortcut ...
move /Y %STARTMENU%\"NetTime\NetTime.lnk" %STARTMENU%\Tools\NetTime.lnk

echo removing NetTime startmenu folder ...
rd /S /Q %STARTMENU%\"NetTime" 2>nul

rem refresh desktop (W10 style)
ie4uinit.exe -show

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