@echo off
net.exe session 1>NUL 2>NUL && (
    goto gotAdmin
) || (
    goto UACPrompt
)
   
:UACPrompt  
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs" 
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs" 
    "%temp%getadmin.vbs" 
    exit /B  
   
:gotAdmin  
    if exist "%temp%getadmin.vbs" ( del "%temp%getadmin.vbs" )  
 
:begin

cd /d %~dp0
bin\jellyfishd.exe uninstall || (
    echo jellyfish is not installed. Continuing with the installation.
)
bin\jellyfishd.exe install
echo jellyfish install finish

pause