@echo off
break=off

set WEBARG1=%1
set WEBARG2=%2

REM to ensure core is run from the batch file for full functionality
set DRWEBSPY=1

C:
CD C:\DRWEBSPY

REM Load the browser...
:loadbrowser
core.exe %WEBARG1% %WEBARG2%
if errorlevel 128 goto end
if errorlevel 64 goto execute
goto end

:execute
REM execute an external program to DR-WebSpyder and then restart
REM DR-WebSpyder with the URL that it was on
call %CACHEPATH%$execute.bat
del %CACHEPATH%$execute.bat
goto loadbrowser

:end
set DRWEBSPY=
set WEBARG1=
set WEBARG2=

