Difference between revisions of "Time synchronization"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
Line 19: Line 19:
  
 
This command succeeds and works even if your date is off by a lot(unlike normal NTP).
 
This command succeeds and works even if your date is off by a lot(unlike normal NTP).
 +
 +
===Net Time Plus NTP===
 +
 +
This package performs a net time sync plus it also sets your domain NTP server as the primary NTP source and configures ntp.org pool servers as fallback NTP sources. The latter is worthwhile for laptop users who aren't necessarily logged on to your domain.<br>
 +
 +
The hex flag 0x8 after the primary NTP server means use standard NTP client behaviour, the hex flag 0x2 designates the NTP server as a fallback to be used if the primary is not available.<br>
 +
 +
<source lang="xml">
 +
<package
 +
        id="time"
 +
        name="Time Synchonization"
 +
        revision="1"
 +
        reboot="false"
 +
        priority="100"
 +
        notify="false"
 +
        execute="once">
 +
 +
<install cmd='net time \\yourntpserver /set /yes' />
 +
<install cmd='COMSPEC% /c w32tm /config /update /manualpeerlist:"yourntpserver,0x8 0.pool.ntp.org,0x2 1.pool.ntp.org,0x2" /syncfromflags:MANUAL' />
 +
 +
<upgrade cmd='net time \\yourntpserver /set /yes' />
 +
<upgrade cmd='%COMSPEC% /c w32tm /config /update /manualpeerlist:"yourntpserver,0x8 0.pool.ntp.org,0x2 1.pool.ntp.org,0x2" /syncfromflags:MANUAL' />
 +
 +
</package>
  
 
[[Category: Silent Installers]]
 
[[Category: Silent Installers]]
 
[[Category: Changing Windows settings]]
 
[[Category: Changing Windows settings]]

Revision as of 03:21, 19 November 2009

This one synchronizes time on a Windows workstation against some other Windows machine (i.e., domain controller etc.).

<package
        id="time"
        name="Time Synchonization"
        revision="1"
        reboot="false"
        priority="100"
        notify="false"
        execute="always">
 
        <install cmd="net time \\timeserver /set /yes" />
 
</package>

If you're using WPKG Client, it's a good idea to put just net time \\timeserver /set /yes in a "pre" script.

This command succeeds and works even if your date is off by a lot(unlike normal NTP).

Net Time Plus NTP

This package performs a net time sync plus it also sets your domain NTP server as the primary NTP source and configures ntp.org pool servers as fallback NTP sources. The latter is worthwhile for laptop users who aren't necessarily logged on to your domain.

The hex flag 0x8 after the primary NTP server means use standard NTP client behaviour, the hex flag 0x2 designates the NTP server as a fallback to be used if the primary is not available.

<package
        id="time"
        name="Time Synchonization"
        revision="1"
        reboot="false"
        priority="100"
        notify="false"
        execute="once">
	
<install cmd='net time \\yourntpserver /set /yes' />
<install cmd='COMSPEC% /c w32tm /config /update /manualpeerlist:"yourntpserver,0x8 0.pool.ntp.org,0x2 1.pool.ntp.org,0x2" /syncfromflags:MANUAL' />

<upgrade cmd='net time \\yourntpserver /set /yes' />
<upgrade cmd='%COMSPEC% /c w32tm /config /update /manualpeerlist:"yourntpserver,0x8 0.pool.ntp.org,0x2 1.pool.ntp.org,0x2" /syncfromflags:MANUAL' />

</package>

[[Category: Silent Installers]]
[[Category: Changing Windows settings]]