Difference between revisions of "NTP client configuration"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m (Reverted edit of 76.177.110.169, changed back to last version by WPKGSysop)
Line 16: Line 16:
 
  sc config w32time start= auto
 
  sc config w32time start= auto
 
  net time /setsntp:192.168.0.100
 
  net time /setsntp:192.168.0.100
  net stop w32time
+
  net stop w32time & net start w32time
 +
w32tm /resync /nowait
 +
 
 +
uninstall.bat:
 +
net time /setsntp:time.windows.com
 +
net stop w32time & net start w32time
 +
w32tm /resync /nowait
 +
 
 +
[[Category: Silent Installers]]
 +
[[Category: Changing Windows settings]]

Revision as of 18:17, 7 July 2007

How to enable or disable NTP client on Windows.

<package
       id="ntp-client"
       name="ntp client configuration"
       revision="1"
       reboot="false"
       priority="1"
       execute="once">
       <install cmd="%SOFTWARE%\ntp\install.bat" />
       <upgrade cmd="%SOFTWARE%\ntp\install.bat" />
       <remove cmd="%SOFTWARE%\ntp\uninstall.bat" />
</package>

install.bat:

sc config w32time start= auto
net time /setsntp:192.168.0.100
net stop w32time & net start w32time
w32tm /resync /nowait

uninstall.bat:

net time /setsntp:time.windows.com
net stop w32time & net start w32time
w32tm /resync /nowait