Вернуться к статье
Листинг 1. Фрагмент содержимого каталога регистрации.
Directory PATH listing Node_ANetlogon:. +--Cluster : Disk_K_on.cmd : netcopy_Disk_K.cmd : +--Disk_K_on : _Q.bat : _R.bat : _S.bat : +--Users _h.bat _I.bat _K.bat _L.bat _M.bat _N.bat _O.bat _P.bat _Q.bat _R.bat _S.bat _V.bat distloc.bat distloc1.bat h.bat hi.bat HIKLMRS.bat HIKLMS.bat HIKLNQRS.bat HIKLNQS.bat HIKLRS.bat HIKNQ.bat HIKNQS.bat HIKS.bat HILMOQRS.bat HILMQRS.bat HILMQS.bat HILMS.bat HILPQRS.bat HILPRS.bat HILQ.bat HILQR.bat HILQRS.bat HILQS.bat HILRS.bat HILS.bat HIMOQRS.bat hIMQS.bat hiNQ.bat hiNQS.bat hIpQS.bat hIQ.bat HIQR.bat HIQRS.bat hIQS.bat hIS.bat HKLMQRS.bat HKLNPQRS.bat HKLNQRS.bat HKLNQS.bat HKLNRS.bat HKLNS.bat HKLPQRS.bat HKLQRS.bat HKLQS.bat HKLRS.bat HKLS.bat HKN.bat HKNPQRS.bat HKNQRS.bat HKNQS.bat HKNS.bat HKPQRS.bat HKQRS.bat HKQS.bat HL.bat HLMOQRS.bat HLMOQS.bat HLMQRS.bat HLMQS.bat HLPQRS.bat HLQ.bat HLQRS.bat HLQS.bat HLR.bat HLRS.bat HLS.bat hMQS.bat hMS.bat hn.bat hNQ.bat hNQS.bat hnS.bat HPQRS.bat hPQS.bat hQ.bat HQR.bat HQRS.bat hQS.bat HR.bat hrs.bat hS.bat I.bat ihmqs.bat ihMS.bat ihqs.bat ihs.bat IKLMNPQS.bat IKLQRS.bat IKLS!.bat IKLS.bat IKMNPQRS.bat IKMNPQS.bat IKMQS.bat IKNQ.bat IKNQS.bat IKNS.bat IKQRS.bat IKQS.bat IKS.bat IL.bat ILMNOQS.bat ILMQRS.bat ILMRS.bat
Листинг 2. Процедура Generic Application для синхронизации каталогов регистрации пользователей.
1 @echo off 2 Cd /d %SystemRoot%system32ReplImportScriptscluster 3 logtime «» 4 logtime «......................................................... Server=%COMPUTERNAME%, DISK_K_ON starting» 5 set s33=S33 6 set s44=S44 7 set host=%COMPUTERNAME% 8 set reserv=%s44% 9 if %host% EQU %s44% set reserv=%s33% 10 set /a i=3 11 :LOOP_LOCAL_COPY 12 if %i%==0 goto ERROR 13 set /a i=%i%-1 14 copy %SystemRoot%system32ReplImportScriptsDisk_K_on*.bat %SystemRoot%system32ReplImportScriptsUsers 1>>logtime.log 2>>sooncopy_error.log 15 if %ERRORLEVEL% NEQ 0 goto LOOP_LOCAL_COPY 16 logtime «Local copies is OK» 17 call sooncopy.bat 1>>logtime.log 2>>soon_error.log 18 logtime «Soon copies is OK» 19 net send Adm1 Generic application Disk_K_on is OK. Script completed successfully 20 net send Adm2 Generic application Disk_K_on is OK. Script completed successfully 21 net send Op1 Generic application Disk_K_on is OK. Script completed successfully 22 net send Op2 Generic application Disk_K_on is OK. Script completed successfully 23 :LOOP_RESERV_COPY 24 sleep 15 25 copy %SystemRoot%system32ReplImportScriptsDisk_K_on*.bat \%reserv% etlogon users 1>>logtime.log 2>>sooncopy_error.log 26 if %ERRORLEVEL% NEQ 0 goto LOOP_RESERV_COPY 27 logtime «Reserv copies is OK» 28 logtime «......................................................... Server=%COMPUTERNAME%, DISK_K_ON complete» 29 Pause 30 exit 0 31 :ERROR 32 net send Adm1 Generic application Disk_K_on is FAILED. Script did not complete. Check CluAdmin on S33 or S44 33 net send Adm2 Generic application Disk_K_on is FAILED. Script did not complete. Check CluAdmin on S33 or S44 34 net send Op1 Generic application Disk_K_on is FAILED. Script did not complete. Check CluAdmin on S33 or S44 35 net send Op2 Generic application Disk_K_on is FAILED. Script did not complete. Check CluAdmin on S33 or S44 36 logtime «Local copies is ERROR» 37 Pause 38 exit 0
Вернуться к статье