home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / batch / mxmnu233.zip / SERVTIME.MNU < prev    next >
Text File  |  1991-09-03  |  957b  |  60 lines

  1. Comment
  2. ====================================================
  3.  
  4. This is a sample menu utility to set the clock on all your file servers
  5. to the same date and time.
  6.  
  7.  Usage: MarxMenu ServTime '08-19-91 3:00pm'
  8.  
  9. This requires a Novell network to run.
  10.  
  11. ====================================================
  12. EndComment
  13.  
  14. StandardIO
  15.  
  16. var
  17.   T
  18.   DateOnly
  19.   Servers
  20.   Serv
  21.  
  22. Trim(CmdLine)
  23.  
  24. if CmdLine = ''
  25.    Writeln
  26.    Writeln 'Usage: MarxMenu ServTime <time>'
  27.    ExitMenu
  28. endif
  29.  
  30. T = TimeOf(CmdLine)
  31. DateOnly = pos(':',CmdLine) = 0
  32.  
  33. if BadDate
  34.    Writeln
  35.    Writeln 'Invalid Date: ' CmdLine
  36.    ExitMenu
  37. endif
  38.  
  39. Writeln
  40.  
  41. Write 'Setting WorkStation Clock ... '
  42. if DateOnly
  43.    Today = T
  44. else
  45.    Now = T
  46. endif
  47. Writeln
  48.  
  49. T = Now
  50. NovAttachedServers(Servers)
  51.  
  52. Loop Servers
  53.    Serv = Servers[LoopIndex]
  54.    Write 'Setting Server ' Serv ' Clock ... '
  55.    NovSetPreferredServer Serv
  56.    NovServerTime = T
  57.    Writeln
  58. EndLoop
  59.  
  60.