This example shows a command file aimed to upgrade GN4 software on an IIS server.
It assumes the following:
•IIS server is 64-bit, but the client files and ClickOnce are 32-bit.
•The new versions are stored as zipped files in the C:\Miles33Install\daily folder.
•32-bit client files are re-compiled on GN4 compilation server (ie. the server with Visual Studio Express installed, and where the add-ins are recompiled.
•There are more than one IIS server.
•It uses 7-zip to unzip.
•It requires C:\TERA\GN4\streams.exe.
@ECHO OFF rem System upgrade procedure for this server rem Applies on GN4 1.6 - on GN4 2.0 GNText and GNPage dlls has been replaced by GNCore and GNCoreWinUI. rem The first one must be installed on editorial servers, the second one is a client only dll. rem GNCore requires Common.dll and Editorial.dll installed into server GAC if OS is prior to 2012 R2 (not on clients). echo. echo RUN THIS COMMAND IN THE ADMINISTRATOR COMMAND PROMPT WINDOW! echo. echo This procedure will: echo 1/ Stop the local IIS service. echo 2/ Extract local client program files, symbols and COM modules from C:\Miles33Install\daily. echo 3/ Un-register and re-register COM modules. echo 4/ Copy 32-bit apps from GN4 compilation server. echo 5/ Extract and update Web server folders. echo 6/ Run GACUTIL. echo 7/ Build CLICKONCE package. echo 8/ Deploy ClickOnce package to all other IIS servers echo 9/ Restart IIS echo. echo ----------------------------------------- echo When done, go to every other IIS server by RDP and run the local update procedure. echo ----------------------------------------- pause echo. echo 1 of 9: Stopping IIS... iisreset /stop echo. echo 1 of 9: IIS stopped! echo. echo 2 of 9: Extracting local client program files, symbols and COM modules... echo. "c:\program files\7-zip\7z" x -y -oc:\tera\gn4\bin C:\Miles33Install\daily\gn4bin_64.zip "c:\program files\7-zip\7z" x -y -oc:\tera\gn4\bin C:\Miles33Install\daily\gn4symbols_64.zip "c:\program files\7-zip\7z" x -y -oc:\tera\gn4\com C:\Miles33Install\daily\COM_64.zip echo. echo 2 of 9: Done with extracting local client program files, symbols and COM modules! echo. echo 3 of 9: Un-registering and re-registering COM modules... regsvr32 /u /s C:\Tera\GN4\COM\dsofile_x64.dll regsvr32 /u /s C:\Tera\GN4\COM\PdfLib_x64.dll regsvr32 /u /s C:\Tera\GN4\COM\XmpFileHandler_x64.dll echo. regsvr32 /s C:\Tera\GN4\COM\dsofile_x64.dll regsvr32 /s C:\Tera\GN4\COM\PdfLib_x64.dll regsvr32 /s C:\Tera\GN4\COM\XmpFileHandler_x64.dll echo. echo 3 of 9: Done with un-registering and re-registering COM module! echo.
echo. echo 4 of 9: Copying 32-bit apps from GN4 COMPILATION server... xcopy \\<compilationserver>\c$\TERA\GN4\rel6\bin\*.* c:\tera\gn4\bin_32 /S/I/Y echo. echo 4 of 9: Done with copying 32-bit apps from GN4 COMPILATION server... echo. echo 5 of 9: Extracting Web server... "c:\program files\7-zip\7z" x -y -oc:\tera\gn4\WEB C:\Miles33Install\daily\gnportal_64.zip echo. echo 5 of 9: Done with extracting Web server! echo. echo 6 of 9: Running GACUTIL... echo. c:\tera\gn4\gacutil /u gnpage c:\tera\gn4\gacutil /u gntext c:\tera\gn4\gacutil /u common c:\tera\gn4\gacutil /u editorial c:\tera\gn4\gacutil /i c:\tera\gn4\web\gnportal\bin\GNPage.dll c:\tera\gn4\gacutil /i c:\tera\gn4\web\gnportal\bin\GNText.dll c:\tera\gn4\gacutil /i c:\tera\gn4\web\gnportal\bin\Common.dll c:\tera\gn4\gacutil /i c:\tera\gn4\web\gnportal\bin\Editorial.dll echo. echo 6 of 9: Done with GACUTIL! echo. echo. echo 7 of 9: Building CLICKONCE package... echo. cd \Tera\GN4\ClickOnceGenerator C:\TERA\GN4\streams.exe -s -d C:\TERA\GN4\BIN_32 call C:\Tera\GN4\ClickOnceGenerator\BuildClickOnce.bat C:\Tera\GN4\WEB\ClickOnce\GN4apps\apps C:\Tera\GN4\BIN_32 echo. echo 7 of 9: Done with building ClickOnce package! echo. echo 8.1 of 9 : Deploying ClickOnce package to IIS2... echo. xcopy C:\Tera\GN4\WEB\ClickOnce \\<IIS2 server>\c$\Tera\gn4\Web\ClickOnce /S/I/Y echo. echo 8.2 of 9: Deploying ClickOnce package to IIS3... echo. xcopy C:\Tera\GN4\WEB\ClickOnce \\<IIS3 server>\c$\Tera\gn4\Web\ClickOnce /S/I/Y echo. echo.
echo 8.3 of 9: Deploying ClickOnce package to DR IIS1... echo. xcopy C:\Tera\GN4\WEB\ClickOnce \\<DR IIS1 server>\c$\Tera\gn4\Web\ClickOnce /S/I/Y echo. echo 8.4 of 9: Deploying ClickOnce package to DR IIS2... echo. xcopy C:\Tera\GN4\WEB\ClickOnce \\<DR IIS2 server>\c$\Tera\gn4\Web\ClickOnce /S/I/Y echo. echo 8.5 of 9: Deploying ClickOnce package to DR IIS3... echo. xcopy C:\Tera\GN4\WEB\ClickOnce \\<DR IIS3 server>\c$\Tera\gn4\Web\ClickOnce /S/I/Y echo. echo 8 of 9: Done with all deploying of ClickOnce package to IIS servers in BRI and LEI echo. echo. echo 9 of 9: Restarting IIS... iisreset /start echo. echo. echo NOW UPDATE IIS2 AND IIS3! echo. pause |