home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Special / chip-cd_2001_spec_05.zip / spec_05 / deploy.cab / lbridge.cmd < prev    next >
OS/2 REXX Batch file  |  1999-11-04  |  4KB  |  112 lines

  1. @Rem -------------------------------------------
  2. @Rem ! L-Bridge.Cmd   version 1.0
  3. @Rem !
  4. @Rem ! Purpose:  Script to push files from the Windows 2000 System Volume
  5. @Rem !           to Export directory (Windows NT version 4, LMRepl).
  6. @Rem !
  7. @Rem ! Instructions: Select one Windows 2000 Domain controller.  
  8. @Rem !               ** You may edit the L-Destination variable below or pass-in **
  9. @Rem !               ** You may optionally swap XCopy for the utility of your choice **
  10. @Rem !               Place this script on your Windows 2000 domain controller.
  11. @Rem !               It is suggested you schedule the script to be run every 2 hours.
  12. @Rem !
  13. @Rem !    Original: December, 1998
  14. @Rem ! Last Update: February, 1999
  15. @Rem ! Last Author:
  16. @Rem !
  17. @Rem !    Comments:
  18. @Rem !
  19. @Rem !
  20. @Rem -------------------------------------------
  21. @Echo Off
  22.  
  23.  
  24. :Variables
  25. @Rem -------------------------------------------
  26. @Rem ! Variables
  27. @Rem !     You may edit or pass-in L-Destination
  28. @Rem -------------------------------------------
  29. Set L-Destination=%1
  30.  
  31. If !%L-Destination%=="!" Goto Instruction
  32. Set L-Name=%0
  33. Set L-Source=\\%USERDNSDOMAIN%\sysvol\%USERDNSDOMAIN%\scripts
  34.  
  35.  
  36. @Echo ! ----------------------------------------
  37. @Echo ! Now running: %L-Name%
  38. @Echo !      Source: %L-Source%
  39. @Echo ! Destination: %L-Destination%
  40. @Echo !
  41. Date /T
  42. Time /T
  43.  
  44. Call :XCopy
  45. @Rem Call :Robocopy
  46.  
  47. Time /T
  48. @Echo ! ----------------------------------------
  49. Goto End
  50.  
  51. :XCopy
  52. @Rem -------------------------------------------
  53. @Rem ! Sample section to use XCopy
  54. @Rem !
  55. @Rem !  Pros: Everybody has XCopy
  56. @Rem !  Cons: Xcopy is blind to file deletes.
  57. @Rem !
  58. @Rem -------------------------------------------
  59. @Rem Note: Remove Echo from line below to activate XCopy
  60.  
  61. Echo Xcopy %L-Source%  %L-Destination%  /s /D
  62.  
  63. @Rem  --  /S option tells xcopy to include sub-dirs.
  64. @Rem  --  /D option tells xcopy to only copies newer files.
  65. Exit
  66.  
  67. :RoboCopy
  68. @Rem -------------------------------------------
  69. @Rem ! Sample section to use Robocopy (from Resource Kit)
  70. @Rem !
  71. @Rem !      Pros: Much better copy utility.  Optionally handles Deletes.
  72. @Rem !      Cons: Requires purchase of Windows 2000 Resource Kit.
  73. @Rem ! Super Con: If /PURGE is used, you must first manually copy over
  74. @Rem !            all your original scripts from NTv4, or you will LOSE them
  75. @Rem !            all very quickly.
  76. @Rem !
  77. @Rem -------------------------------------------
  78. @Rem Note: Remove Echo from line below to activate Robocopy
  79.  
  80. Echo Robocopy %L-Source%  %L-Destination%  /E /PURGE
  81.  
  82. @Rem  --  /E option tells robocopy to include sub-dirs
  83. @Rem  --  /PURGE option tells robocopy to delete files no longer in source
  84. Exit
  85.  
  86.  
  87. :Instruction
  88. @Echo !
  89. @Echo ! %L-NAME% was improperly configured or improperly invoked.
  90. @Echo !
  91. @Echo ! Before using %l-name%, it is strongly suggested that you review the
  92. @Echo ! planning and deployment guides for information on transitioning LMRepl
  93. @Echo ! to the System volume.
  94. @Echo !
  95. @Echo ! The purpose of this command script is to bridge the two replication
  96. @Echo ! architectures for logon scripts between an NTv4 domain controller and
  97. @Echo ! a Windows 2000 domain controller colluding on a single domain (mixed mode).
  98. @Echo !
  99. @Echo ! In short, this command file copies (Xcopies or robocopies) logon scripts
  100. @Echo !    from: %l-Source%
  101. @Echo !      to: %l-destination%
  102. @Echo ! If 'to:' is blank above, you've probably just found your problem.  Either
  103. @Echo ! edit %L-Name% or pass in the destination machine and share.
  104. @Echo !      ex: %l-name% \\mymachine\netlogon\scripts
  105. @Echo !
  106. @Echo !
  107.  
  108. Goto End
  109.  
  110. :End
  111. Exit
  112.