Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. @echo off
  2.  
  3. rem ----------------------------------------------------------------------------
  4. rem With this batch script you can easily switch between different versions of
  5. rem the pGSAxCampusNET DLLs.
  6. rem
  7. rem 30.06.2016
  8. rem Henning Storck
  9. rem ----------------------------------------------------------------------------
  10.  
  11. set version=%1
  12. set action=%2
  13.  
  14. if "%version%" == "142" (
  15. set fullversion=4.3.142
  16. set gwversion=X5
  17. )
  18. if "%version%" == "143" (
  19. set fullversion=4.4.143
  20. set gwversion=X5
  21. )
  22. if "%version%" == "144" (
  23. set fullversion=4.4.144
  24. set gwversion=X5
  25. )
  26. if "%version%" == "145" (
  27. set fullversion=4.5.145
  28. set gwversion=X7
  29. )
  30. if "%version%" == "146" (
  31. set fullversion=4.5.146
  32. set gwversion=X7
  33. )
  34.  
  35. set serverpath=C:\gw\%gwversion%\Server
  36. set netdllpath=C:\gw\dll\v%fullversion%\pGSAxCampus.NET
  37.  
  38. if not "%fullversion%" == "%" (
  39. if "%action%" == "update" goto updatedll
  40. if "%action%" == "register" goto registerdll
  41. if "%action%" == "unregister" goto unregisterdll
  42. )
  43.  
  44. echo Usage: ^register.bat ^<version^> ^<update^|^register^|unregister^>
  45. goto end
  46.  
  47. :updatedll
  48.  
  49. echo -------------------- Update .^NET DLL --------------------
  50. @xcopy "\\edu-43-build01\Campus V4 Share\Shared\%gwversion%\v%fullversion%\pGSAxCampus.NET" %netdllpath% /e /y /i
  51. goto end
  52.  
  53. :registerdll
  54.  
  55. echo -------------------- Kill ISS --------------------
  56. iisreset
  57.  
  58. echo -------------------- Kill gW --------------------
  59. %windir%/system32/taskKill /f /Im gWDocumentPort.exe
  60. %windir%/system32/taskKill /f /Im MMCTeamWorks.exe
  61. %windir%/system32/taskKill /f /Im ManagementConsole.exe
  62. %windir%/system32/taskKill /f /Im gwserviceprog.exe
  63. %windir%/system32/taskKill /f /Im Genesis.exe
  64. %windir%/system32/taskKill /f /Im GenesisWorld.exe
  65. %windir%/system32/taskKill /f /Im CASContact.exe
  66. %windir%/system32/taskKill /f /FI "USERNAME ne SYSTEM" /Im dllhost.exe
  67. %windir%/system32/taskKill /f /FI "USERNAME ne SYSTEM" /Im dllhst3g.exe
  68. %windir%/system32/taskKill /f /Im GenesisSessions.exe
  69. %windir%/system32/taskKill /f /Im FirstAccess.exe
  70. %windir%/system32/taskKill /f /Im xtests.exe
  71. %windir%/system32/taskKill /f /Im pGCAxOutlookAddIn.exe
  72.  
  73. echo -------------------- Update Delphi DLL --------------------
  74. @xcopy "\\edu-43-build01\Campus V4 Share\Shared\%gwversion%\v%fullversion%\gW Server" %serverpath% /e /y /i
  75.  
  76. echo -------------------- ^Register .^NET DLL --------------------
  77. call %netdllpath%"\REGISTER - pGSAxCampusNET.bat"
  78. goto end
  79.  
  80. :unregisterdll
  81.  
  82. echo -------------------- Unregister .^NET DLL --------------------
  83. call %netdllpath%"\UNREGISTER - pGSAxCampusNET.bat"
  84. goto end
  85.  
  86. :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement