@echo off

net session >nul 2>&1
if %errorlevel% equ 0 (
    echo Installing...
    goto Install 
) else (
    echo FAILED: Please run this script as admin. Exiting.
    goto End
)

:Install

pushd %~dp0

pushd bin
EnableVROverlay_x64.exe -uninstall
popd

REM echo "Installing NV display events manifest"
pushd etw_nv 
call nvinstall.cmd > nul
popd

REM echo "Installing events for power reporting"
pushd etw_fcat
call htcvive_install.bat >nul 2>nul
popd

:InstallComplete

echo SUCCESS: Installation completed

:End
pause