@echo off
rem Never edit this file under Linux, the Linux linefeeds prevent
rem Windows from executing it
ver|find "Windows 95">NUL
if not errorlevel 1 goto WIN9XME
ver|find "Windows 98">NUL
if not errorlevel 1 goto WIN9XME
ver|find "Windows Millennium">NUL
if not errorlevel 1 goto WIN9XME
ver|find "Windows NT">NUL
if not errorlevel 1 goto WINNT
ver|find "Windows 2000">NUL
if not errorlevel 1 goto WINNT
ver|find "Windows XP">NUL
if not errorlevel 1 goto WINXP
goto WINNT

:WIN9XME
echo Now installing MODELS@HOME for WINDOWS 98/ME
echo.
set DIR=c:\windows
copy tlist98.exe ..\tlist.exe>NUL
copy kill98.exe ..\kill.exe>NUL
goto COMMON

:WINNT
echo Now installing MODELS@HOME for WINDOWS NT
echo.
set DIR=c:\winnt\system32
copy tlistNT.exe ..\tlist.exe>NUL
copy killNT.exe ..\kill.exe>NUL
goto COMMON

:WINXP
echo Now installing MODELS@HOME for WINDOWS XP
echo.
set DIR=c:\windows\system32
copy tlistNT.exe ..\tlist.exe>NUL
copy killNT.exe ..\kill.exe>NUL
goto COMMON

:COMMON
echo Installing new screen saver %DIR%
REM We cannot overwrite the real logon.scr due to Windows File Protection
copy ..\logon.scr %DIR%\logon2.scr /Y
copy ..\modelsathome.scr %DIR%\modelsathome.scr
echo ...

:END
echo Replacing whatif.fig and DSSP
copy whatif.win ..\whatif\WHATIF.FIG
copy ..\whatif\dssp\dsspwin.exe ..\whatif\dssp\DSSP.EXE
echo ...
echo.
echo If you also want to run the screen saver as a user, select the "modelsathome"
echo screensaver from the list in the display properties.
echo.
echo Running the screensaver to test installation
rem This will also modify the registry accordingly
cd ..
cluster.exe -tst
