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

@if '%1' == 'run' (goto RUN)
@start %name%updateu cmd %thisn% run

@GOTO :EOF

:RUN
@echo %this%%thisn%


@echo.
@echo This will remove the Windows right-click menus for %name%.
@echo.
@echo Click close to abort.
@pause

@FOR %%X IN ("%this%*%name%.exe") DO @CALL :RESET "%%X"

@pause

@GOTO :EOF

:RESET
@set file=%~n1
@set app=%this%%file%.exe

@echo.
@echo Changing settings for %file%
@echo.
@pushd %this%

@echo "%app%" /AsSettings menu
@"%app%" /AsSettings menu

@echo.
@echo %file% settings changes are complete
@echo.

@popd
@goto :EOF


