@Echo off

rem ----------------------------------------------------------------------------
rem  function: Mapp's Tc Sites and Settings
rem  change history:
rem  04.06.2010 12:26 J.Fes   new created

rem Parameters:
rem P1 = site to get Site Settings
rem P2 = Var Return's Site Share
REM if "%2" neq "" goto :MySelfTestStart
REM Echo ##debug selftest
REM call %0 ATH SiteShareX
REM Echo ##Debug: SiteShare=[%SiteShareX%]
REM Pause
REM exit
REM goto :eof


:MySelfTestStart
setlocal

 set P1=%1
 set P2=%2
 set SiteId=%1
REM  Echo SiteId:[%SiteId%]
REM  Echo P1:[%P1%]
REM  Echo P2:[%P2%]

 rem error missing Parameters
 if "%P2%"=="" goto :ExitErrMissingParameters

 set SubDir=
 goto :%SiteId%
 :Site1
  set SiteShare=\\MySite1Server\ugsshare
  goto :MyExitOk


:ExitErrMissingSite
  endlocal
  set SiteMappingResCode=200
  set SiteMappingMsg=Err:%SiteMappingResCode% [cannot find SiteId:%SiteId%]
  Echo Missing SiteId
  Echo committed Parameter: P1=[%P1%] P2=[%P2%]
  Echo %SiteMappingMsg%
  pause
  goto :eof


:ExitErrMissingParameters
  endlocal
  set SiteMappingResCode=100
  set SiteMappingMsg=Err:%SiteMappingResCode% [missing parameter P1=SiteId]
  Echo Missing Parameters
  Echo committed Parameter: P1=[%P1%] P2=[%P2%]
  Echo %SiteMappingMsg%
  pause
  goto :eof


:MyExitOk
  Echo SiteMapping SiteId:[%SiteId%] uses RfSiteShare:[%SiteShare%]
  endlocal& set %2=%SiteShare%&
  set SiteMappingResCode=0
  set SiteMappingMsg=OK
  goto :eof







