anchor.diff:  echo.
   echo Setup WCF test services hosted on IIS for the testing of WCF on .NET Core
   echo.
  -echo Usage: %~n0 Id [/c]
  +echo Usage: %~n0 Id [/c] [/p:{PathToWcfRepo}]
   echo    Id: The Id of a WCF repo and its associated IIS hosted services to be created.
   echo        The Id will be appended to the name of all assets to be created.
   echo        %_idMaster%: if Id is '%_idMaster%', additional IIS hosted services such as PRService
   echo        will be created to serve as central services for other WCF repos. 
   echo    /c: If specified, this will clean up any existing setup of Id instead of creating new.
  +echo    /p: If an existing WCF repo is preferred to be used, use this parameter to provide the
  +echo        path to a WCF repo. Otherwise, the script will clone a new WCF repo at %_repoHome%
  +echo        to use as the source of WCF test service.
   echo.
   echo Examples:
   echo    %~n0 42
   echo    :Create a WCF repo named 'wcf42' and IIS hosted services such as 'WcfService42'
   echo    %~n0 42 /c
   echo    :Clean up WCF repo 'wcf42' and all associated IIS hosted services such as 'WcfService42'
  +echo    %~n0 42 /p:"c:\my\existing\wcf\repo"
  +echo    :Create an IIS hosted service named 'wcfService42' by using existing WCF repo located at "c:\my\existing\wcf\repo".
   goto :Done
   
   :Run
  
positive.code: %_appcmd% delete apppool %_prServiceName% >nul
  %_appcmd% delete app "Default Web Site/%_wcfServiceName%" >nul
  %_appcmd% delete apppool %_wcfServiceName% >nul
  if EXIST %_currentRepo% rmdir /s /q %_currentRepo%
  if EXIST %_wcfTestDir% if /I '%_masterRepo%'=='%_currentRepo%' rmdir /s /q %_wcfTestDir%
  echo Clean up done.
  if /I '%2'=='/c' goto :Done
  
  :: Make sure git.exe is available
  where git.exe /Q
  
negative.code: 
  :: TODO: Grant all existing app pools named WCFService# 'Read' access to %_wcfTestDir%. This is not needed for now
  
  :: Grant app pool %_certService% "Read" access to %_wcfTestDir% and its subdirectories
  echo Grant app pool %_certService% "Read" access to %_wcfTestDir% and its subdirectories
  call :Run icacls %_wcfTestDir% /grant:r "IIS APPPOOL\%_certService%":(OI)(CI)R /Q
  if ERRORLEVEL 1 goto :Failure
  
  :SkipCertInstall
  
  :: Unlock the configuration of sslFlags
  echo Unlock the IIS config section to allow sslFlags to be overriden
  