Advertisement
adamchilcott

terraCopy.cmd

Oct 3rd, 2017
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.56 KB | None | 0 0
  1. @echo off
  2.  
  3. cls
  4.  
  5. setlocal
  6.  
  7. REM ###########################
  8. REM # Code Sector Inc. TeraCopy
  9. REM ###########################
  10.  
  11. set exeLocation=\\wds00x.avondale.edu.au\DCSWRepository\repository.d\codeSector.d
  12. set /p driveLetter="Please Enter A Drive Letter e.g. Z: "
  13.  
  14. REM #####################
  15. REM # Mount Remote Server
  16. REM #####################
  17. if exist %driveLetter% (
  18.     net use %driveLetter% /delete /y
  19.     net use %driveLetter% %exeLocation% /savecred
  20. ) else (
  21.     net use %driveLetter% %exeLocation% /savecred
  22. )
  23.  
  24. REM ###############
  25. REM # Install *.exe
  26. REM ###############
  27. start /b /wait %exeLocation%\teracopy.exe /silent
  28.  
  29. REM ##########
  30. REM # Clean-Up
  31. REM ##########
  32. net use %driveLetter% /delete /y
  33.  
  34. endlocal
  35.  
  36. REM #############
  37. REM # START NOTES
  38. REM #############
  39.  
  40. REM # 2-clause license ("Simplified BSD License" or "FreeBSD License")
  41. REM #
  42. REM # Copyright © 2018, Adam Brian Chilcott
  43. REM # All rights reserved.
  44. REM #
  45. REM # Redistribution and use in source and binary forms, with or without
  46. REM # modification, are permitted provided that the following conditions are met:
  47. REM #
  48. REM # 1. Redistributions of source code must retain the above copyright notice, this
  49. REM # list of conditions and the following disclaimer.
  50. REM # 2. Redistributions in binary form must reproduce the above copyright notice,
  51. REM # this list of conditions and the following disclaimer in the documentation
  52. REM # and/or other materials provided with the distribution.
  53. REM #
  54. REM # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  55. REM # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  56. REM # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  57. REM # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  58. REM # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  59. REM # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  60. REM # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  61. REM # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  62. REM # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  63. REM # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  64. REM #
  65. REM # The views and conclusions contained in the software and documentation are those
  66. REM # of the authors and should not be interpreted as representing official policies,
  67. REM # either expressed or implied, of the FreeBSD Project.
  68.  
  69. REM ###########
  70. REM # END NOTES
  71. REM ###########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement