Sunday, March 20, 2011

ArcGIS Server SOE Batch Installation File

I am sure more and more GIS people are working on SOE now, especially after ESRI announced on 2011 Dev Summit that ADF was out and AGS local connection was out. However, it's not that easy to create a SOE, at least not easy for the first time.

To help people coming along, I posted the batch file I have been using to install or uninstall a SOE. Let me know what you think.

I am a newbie to blogging, surprisingly, still trying to figure out how to get the code displayed not plainly.

@echo off

rem The commandline utility of installing or uninstalling MapLegendRestSOE with ArcGIS Server 10

set SOE_INSTALL=C:\Proj\AGS_SOE\Legend
set AGS_COMMOM="c:\Program Files\Common Files\ArcGIS\bin"
set WIN_DOTNET="%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727"

if "%1" == "" goto install
if not "%2" == "" goto usage
if /i %1 == install     goto install
if /i %1 == uninstall     goto uninstall
goto usage

%WIN_DOTNET%\regasm %SOE_INSTALL%\MapLegendRestSOE.dll /codebase
%AGS_COMMOM%\ESRIRegAsm.exe %SOE_INSTALL%\MapLegendRestSOE.ArcCatalog.dll /p:Desktop /s
echo MapLegendSOE is installed successfully
goto :eof

%SOE_INSTALL%\RegisterMapLegendRestSOE.exe /unregister
%AGS_COMMOM%\ESRIRegAsm.exe %SOE_INSTALL%\MapLegendRestSOE.ArcCatalog.dll /p:Desktop /u /s
%WIN_DOTNET%\regasm /unregister %SOE_INSTALL%\MapLegendRestSOE.dll
echo MapLegendSOE is uninstalled successfully
goto :eof

echo Error in script usage. The correct usage is:
echo     %0 [option]
echo where [option] is: install ^| uninstall
echo For example:
echo     %0 install

goto :eof



Post a Comment

Subscribe to Post Comments [Atom]

<< Home