Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem ----------------------------------------------------------------------------
- rem With this batch script you can easily switch between different versions of
- rem the pGSAxCampusNET DLLs.
- rem
- rem 30.06.2016
- rem Henning Storck
- rem ----------------------------------------------------------------------------
- set version=%1
- set action=%2
- if "%version%" == "142" (
- set fullversion=4.3.142
- set gwversion=X5
- )
- if "%version%" == "143" (
- set fullversion=4.4.143
- set gwversion=X5
- )
- if "%version%" == "144" (
- set fullversion=4.4.144
- set gwversion=X5
- )
- if "%version%" == "145" (
- set fullversion=4.5.145
- set gwversion=X7
- )
- if "%version%" == "146" (
- set fullversion=4.5.146
- set gwversion=X7
- )
- set serverpath=C:\gw\%gwversion%\Server
- set netdllpath=C:\gw\dll\v%fullversion%\pGSAxCampus.NET
- if not "%fullversion%" == "%" (
- if "%action%" == "update" goto updatedll
- if "%action%" == "register" goto registerdll
- if "%action%" == "unregister" goto unregisterdll
- )
- echo Usage: ^register.bat ^<version^> ^<update^|^register^|unregister^>
- goto end
- :updatedll
- echo -------------------- Update .^NET DLL --------------------
- @xcopy "\\edu-43-build01\Campus V4 Share\Shared\%gwversion%\v%fullversion%\pGSAxCampus.NET" %netdllpath% /e /y /i
- goto end
- :registerdll
- echo -------------------- Kill ISS --------------------
- iisreset
- echo -------------------- Kill gW --------------------
- %windir%/system32/taskKill /f /Im gWDocumentPort.exe
- %windir%/system32/taskKill /f /Im MMCTeamWorks.exe
- %windir%/system32/taskKill /f /Im ManagementConsole.exe
- %windir%/system32/taskKill /f /Im gwserviceprog.exe
- %windir%/system32/taskKill /f /Im Genesis.exe
- %windir%/system32/taskKill /f /Im GenesisWorld.exe
- %windir%/system32/taskKill /f /Im CASContact.exe
- %windir%/system32/taskKill /f /FI "USERNAME ne SYSTEM" /Im dllhost.exe
- %windir%/system32/taskKill /f /FI "USERNAME ne SYSTEM" /Im dllhst3g.exe
- %windir%/system32/taskKill /f /Im GenesisSessions.exe
- %windir%/system32/taskKill /f /Im FirstAccess.exe
- %windir%/system32/taskKill /f /Im xtests.exe
- %windir%/system32/taskKill /f /Im pGCAxOutlookAddIn.exe
- echo -------------------- Update Delphi DLL --------------------
- @xcopy "\\edu-43-build01\Campus V4 Share\Shared\%gwversion%\v%fullversion%\gW Server" %serverpath% /e /y /i
- echo -------------------- ^Register .^NET DLL --------------------
- call %netdllpath%"\REGISTER - pGSAxCampusNET.bat"
- goto end
- :unregisterdll
- echo -------------------- Unregister .^NET DLL --------------------
- call %netdllpath%"\UNREGISTER - pGSAxCampusNET.bat"
- goto end
- :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement