home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / CopyLock / cmdtest.bat < prev    next >
DOS Batch File  |  2004-05-06  |  924b  |  51 lines

  1. @echo off
  2.  
  3. if (%1) == () goto InvalidFile
  4.  
  5. echo Replacing %1 using CopyLock
  6.  
  7. rem optionally adds:
  8. rem  /downgrade to accept downgrade while replacing a file
  9. rem  /reboot to automatically reboot if needed to complete the replacement
  10.  
  11. copylock.exe %1 %2
  12.  
  13. if errorlevel 5 goto Pending
  14. if errorlevel 4 goto Deleted
  15. if errorlevel 3 goto Replaced
  16. if errorlevel 2 goto DowngradeError
  17. if errorlevel 1 goto GeneralError
  18. if errorlevel 0 goto NotProcessed
  19.  
  20. echo Unknown error
  21. goto end
  22.  
  23. :InvalidFile
  24. echo Invalid file name
  25. goto end
  26.  
  27. :NotProcessed
  28. echo File not processed
  29. goto end
  30.  
  31. :GeneralError
  32. echo An error occured or file not found
  33. goto end
  34.  
  35. :DowngradeError
  36. echo Downgrade not allowed
  37. goto end
  38.  
  39. :Replaced
  40. echo The file was successfully replaced
  41. goto end
  42.  
  43. :Deleted
  44. echo The file was successfully deleted
  45. goto end
  46.  
  47. :Pending
  48. echo The file is queued for replacement on next reboot
  49.  
  50. :end
  51.