anchor.diff:  set is64=0
   if /I %Processor_Architecture%==AMD64 set is64=1
   if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" set is64=1
  -GOTO:eof
  -
  -:: ----------------------------
  -::  Finds IDE type from params
  +echo "System is 64 bit: %is64%" >> %logfile%
  +GOTO:eof
  +
  +:: ----------------------------
  +::  Parsing URI for IdeExe
  +::
  +:: Constant quotations around the string is because of the special chars that are in the URI and will cause the script to fail otherwise
  +:: ----------------------------
  +:getIde
  +:: Default the IDE to IntelliJ
  +set ide=idea
  +:: If IdeExe is not in URI then skip forward with default IDE
  +if x%uri:IdeExe=%==x%uri% GOTO:eof
  +:: Remove the substring before the IdeExe
  +set "ide=%uri:*IdeExe=%"
  +::Remove extra quotes
  +set "ide=%ide:"=%"
  +:: Remove remaining parameters at the end of the string so only the IdeExe is left
  +for /F "usebackq delims=^&^ tokens=1" %%a in ('%ide%') do set ide=%%a
  +:: Removing leading whitespace
  +for /F "tokens=* delims= " %%a in ('echo %ide%') do set ide=%%a
  +GOTO:eof
  +
  +:: ----------------------------
  +::  Parsing URI for IdeType
  +::
  +:: Constant quotations around the string is because of the special chars that are in the URI and will cause the script to fail otherwise
   :: ----------------------------
   :getType
   :: Default the IDE to IntelliJ
   set type=IntelliJ
  +:: If IdeType is not in URI then skip forward with default IDE
   if x%uri:IdeType=%==x%uri% GOTO:eof
  +:: Remove the substring before the IdeExe
   set "type=%uri:*IdeType=%"
  +::Remove extra quotes
   set "type=%type:"=%"
  +:: Remove remaining parameters at the end of the string so only the IdeType is left
   for /F "usebackq delims=^&^ tokens=1" %%a in ('%type%') do set type=%%a
  +:: Removing leading whitespace
   for /F "tokens=* delims= " %%a in ('echo %type%') do set type=%%a
   GOTO:eof
   
  +:: ----------------------------
  +:: Create log file
  +:: ----------------------------
  +:createLogFile
  +set shortDate=%date:~4%
  +for /F "delims=/ tokens=1,2,3" %%a in ('echo %shortDate%') do (
  +    set month=%%a
  +    set day=%%b
  +    set year=%%c
  +)
  +
  +set shortTime=%time:~0,-3%
  +for /F "delims=: tokens=1,2,3" %%a in ('echo %shortTime%') do (
  +    set hour=%%a
  +    set minute=%%b
  +    set second=%%c
  +)
  +set logfile="%TEMP%\vsts_protocol_handler_%year%.%month%.%day%_%hour%.%minute%.%second%.txt"
  +echo.>%logfile%
  +GOTO:eof
  +
   :end
  +echo "Exiting script..." >> %logfile%
   @endlocal & exit
positive.code:     GOTO setAndroidExe
  ) else (
      :: Remove the extra parameter wildcard at the end of registry entry
      set exePath="!exePath:~0,-5!"
  )
  GOTO launch
  
  
negative.code:     set exePath="%SYSTEMDRIVE%\Program Files ^(x86^)\%directory%"
      GOTO findIdeDirectory
  )
  :: IDE parent directory was not found. Can't find exe to run so exit and log an error
  echo "Error: The IDE could not be found on this machine in the default $directory% directory and therefore couldn't be opened." >> %logfile%
  GOTO end
  
  :: ----------------------------
  