anchor.diff:  )
   
   if "%1"=="-i" (
  -    set installsisx=true
  +    set installsigned=true
       set pkgfile=%2
       set basename=%~n2
       set signsis1=%3
       set signsis2=%4
       set signsis3=%5
   ) else (
  -    set installsisx=false
  +    set installsigned=false
       set pkgfile=%1
       set basename=%~n1
       set signsis1=%2
  
positive.code:     )
  
      set certificate=%signsis1%
      signsis %basename%.sis %basename%.sisx %signsis1% %signsis2% %signsis3%
  )
  
  :install
  if exist %basename%.sisx (
      echo Successfully created %basename%.sisx using certificate %certificate%
      if "%installsisx%" == "true" (
          echo Installing %basename%.sisx...
          call %basename%.sisx
      )
  )
  
  :cleanup
  if exist %basename%.sis del %basename%.sis
  
  :done
negative.code:     set signsis3=%4
  )
  
  set unsigned_sis_name=%basename%_unsigned.sis
  set signed_sis_name=%basename%.sis
  
  rem Get absolute path to this script
  set scriptpath=%~dp0
  
  rem Check the .pkg actually exists.
  if not exist %pkgfile% (
      echo Error: Package description file '%pkgfile%' does not exist.
      goto done
  )
  
  rem Remove any existing .sis packages
  if exist %signed_sis_name% del %signed_sis_name%
  if exist %unsigned_sis_name% del %unsigned_sis_name%
  
  rem Create .sis package
  makesis %pkgfile% %unsigned_sis_name%
  
  rem If no certificate is given, check default options
  if x%signsis1% == x (
      rem If RnD certificate is not found, sign with self signed certificate
      if not exist %scriptpath%..\rd.cer (
          set certificate=Self signed
          signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\selfsigned.cer %scriptpath%..\selfsigned.key
          goto install
      )
  
      rem Sign with RnD certificate
      set certificate=RnD
      signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\rd.cer %scriptpath%..\rd-key.pem
  ) else (
      if x%signsis2% == x (
         echo Custom certificate key file parameter missing.
  