@ECHO OFF

REM Install CaNS BGinfo 

cls
ECHO +------------------------------+
ECHO ! CHOOSE SERVER TYPE      V1.2 !
ECHO +------------------------------+
ECHO ! 1 - 2025/2022 Server         !
ECHO ! 2 - 2025/2022 Terminalserver !
ECHO +------------------------------+
ECHO ! 9 - QUIT without installing  !
ECHO +------------------------------+
choice /C 129  /M "Select an option  "
IF errorlevel 9 goto end
IF errorlevel 2 goto 2025-TS
IF errorlevel 1 goto 2025-SRV


goto end

:2025-SRV
echo CHOICE : 2025-SRV
COPY %~dp0\CANS-2025-SRV.BGI CANS.BGI
goto goon

:2025-TS
echo CHOICE 2025-TS
COPY %~dp0\CANS-2025-TS.BGI CANS.BGI
goto goon


:goon


ECHO Create Folder and copy files
ECHO -----------------------------
MD C:\TASKS\BGINFO
COPY %~dp0\*.* C:\TASKS\BGINFO

ECHO Copy BGinfo link to all-desktop
ECHO -------------------------------
copy "c:\tasks\bginfo\Press me to update Host Info.lnk"   "C:\Users\Public\Desktop\Press me to update Host Info.lnk"


ECHO Create Task to start bginfo on logon
ECHO ------------------------------------
schtasks /create /SC ONLOGON /TN "TASKS\CaNS-UpdateBGInfoOnLogon" /TR "C:\TASKS\BGINFO\Bginfo64.exe C:\TASKS\BGINFO\CaNS.bgi /silent /Timer:0 /nolicprompt"


PAUSE

c:\tasks\bginfo\updatehostinfo.cmd

:end