@echo off
setlocal
set this=%~dp0
set thisn=%~nx0
set name=AddOnStudio

echo.
echo %this%%thisn%
echo This will enable setup for %name%.
echo.
FOR %%X IN ("%this%*%name%.exe") DO @CALL :REFRESH "%%X"
goto RUN

:REFRESH
set file=%~n1
set app=%this%%file%.exe
echo Enabling setup for %file%
pushd %this%
"%app%" /AsRefresh
echo %file% setup is complete
popd
goto :EOF

:RUN
start /b "" "%app%" /log
