@echo off
rem FireFox startup file for BartPE
if not exist "%~dp0firefox.exe" (
	echo FIREFOX: The file "%~dp0firefox.exe" does not exist!!!
	goto _err)
echo FIREFOX: Creating directory: %userprofile%\Mozilla\Firefox\Profiles
mkdir "%userprofile%\Mozilla\Firefox\Profiles"
if not exist "%userprofile%\Mozilla\Firefox\Profiles" (
	echo FIREFOX: The directory "%userprofile%\Mozilla\Firefox\Profiles" does not exist!!!
	goto _err)
echo FIREFOX: Creating profile
%~dp0firefox.exe -CreateProfile "BartPE %userprofile%\Mozilla\Firefox\Profiles"
echo FIREFOX: Starting...
start %~dp0firefox.exe -p BartPE
goto :_end
:_err
echo.
echo FIREFOX: There was an error, script aborted!!!
rem set errorlevel to 1 by (mis)using color
color 00 
:_end
