@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b

set SOFTWARE=..\software
set MSI=vnc-setup.msi
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"

if NOT EXIST %SOFTWARE%\%MSI% (
  echo ERROR: %SOFTWARE%\%MSI% not found!
  exit /b
)

echo ####### %0 #######

echo installing vnc (server) ...
cd %SOFTWARE%
@echo on
msiexec /i %MSI% /qn
@echo off

echo cleanup ...
del /F /Q %STARTMENU%\"TightVNC\Visit TightVNC Web Site.lnk" 2>nul

echo ####### %0 #######

