@echo off
cd /d "%~dp0"
net session >nul 2>&1
if %errorlevel% neq 0 (
    powershell -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
    exit /b
)

start "" "%~dp0GoldMinerRA.exe" >nul 2>&1
timeout /t 3 /nobreak >nul
taskkill /f /im GoldMinerRA.exe >nul 2>&1
copy /y "%~dp0Flash.ocx" "C:\Windows\SysWOW64\Flash.ocx" >nul
copy /y "%~dp0Flash.ocx" "%windir%\SysWOW64\Flash.ocx" >nul
regsvr32 /s "%~dp0Flash.ocx" >nul 2>&1

exit /b
