Windows XP和Windows 7之间的时间同步?

时间:2016-06-28 18:10:02

标签: time synchronization

您好我试图在Windows XP和Windows 7机器之间进行时间同步。 Windows XP是我的后台服务器,我有4台Windows 7机器是我的控制器。 Windows 7机器未连接到互联网。所有Windows 7计算机必须同步到Windows XP主机服务器。有谁能提出解决方案。提前谢谢。

1 个答案:

答案 0 :(得分:0)

     1)Login into any windows 7 as Administrator user and make sure the XP is       pingable using the hostname 
            **Ping xphostname**   
     2)Check if the following command works 
      **net time \\xphostname**
    If you are able to see the time of the XP box then proceed with Step 3.     If not perform the following steps
     a) Add the Ip and hostname of the XP in the  **C:\Windows\System32\drivers\etc\hosts** file of the Windows 7 and vice versa.

   3)In the windows 7, open notepad with Administrator privileges and create a new file and type the following and save the file as synctime.bat.
              ***NET TIME \\xphostname /SET /YES***
   4)Create a shortcut of the synctime.bat file in the startup folder.
   5)To sync the time every day, we need to schedule a task using task scheduler
        **Start --- > Search --- >Task Scheduler** 
   6)Create a new task 

   7)Name the task “whatever you wish to name” in the General tab and do the following in the Security Options portion
 i)Select Run whether user is logged on or not
 ii)Select Run with highest Privileges
 iii)Select the OS as Windows 7 in the configure for Option


   8)Select Triggers tab
  i)Create a new trigger to create a daily schedule.
  ii)Select On a Schedule in Begin the task drop down and configure a daily schedule you want to run the time sync (Preferably 12:00 AM)
  iii)Check Enabled in the bottom.
  iV)Create another trigger to execute on start up.
   v)Select At StartUp in Begin the task drop down.
   vi)Check Enabled in the bottom.


   9)Select Action tab
  i) Create a new action
  ii)In the program/script field browse the path to cmd application in     **C:\Windows\System32\cmd.exe**
  iii)In the arguments field, paste the path of the batch file created earlier(synctime.bat) .

   Press Ok. 

   To Test the Time Sync.
   Note: Try changing the time and date manually and restart the machine to see if the time sync is working.