@ECHO OFF
rem   command /e:2048
rem   command /e:2048 /k c:\t.bat done
:done
ECHO MouseWare File Installation Batch for Windows 3.1
ECHO Copyright (c) 1995-1997, Logitech, Inc.  All Rights Reserved
if '%1' == 'diskb' goto diskb
If '%1\' == '%2\' goto FORMAT
if '%2' == '' goto FORMAT
set LANGID=ENU
If '%3' == '' goto LANGOK
set LANGID=%3

:LANGOK
goto srce_ab

:start

:FORMAT
cls
echo *******************************************************************
echo *  This batch file should only be used when the SETUP             *
echo *  program fails to complete the installation of MouseWare        *
echo *  in Windows 3.1 .                                               *
echo *                                                                 *
echo *  Run it from DOS mode.                                          *
echo *  DO NOT run it from a Windows DOS box.                          *
echo *******************************************************************
echo.

echo.
echo *******************************************************************
echo * To run T.BAT you need to specify the source drive               *
echo * and the destination drive and directory:                        *
echo *                                                                 *
echo * T  sourcedirectory  destinationdirectory                        *
echo *                                                                 *
echo * if the source drive is A: and the destination directory         *
echo * is C:\MOUSE type:                                               *
echo *                      T  A:  C:\MOUSE                            *
echo *                                                                 *
echo *******************************************************************
echo.
GOTO End

:srce_ab
if '%1' == 'b:' goto srceb
if '%1' == 'B:' goto srceb
if '%1' == 'a:' goto srcea
if '%1' == 'A:' goto srcea

:srcea
set SRCE=A:
goto srceok

:srceb
set SRCE=B:

:srceok
IF NOT EXIST %2 md %2 > nul

SET IFE=IF EXIST
SET LGE=lgexpand.exe
SET dsk=%1
SET SRCE=%dsk%
SET Dir_Mous=%2
SET DS=%Dir_Mous%
SET ECO=ECHO .........
SET disk_x=first

:winok
@ECHO OFF

SET FI=t.bat
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% C:\%FI%
%IFE% %FI% %ECO%Copied %FI%

%IFE% %SRCE%\%lge% COPY %SRCE%\%lge% %DS%\%lge%
%IFE% %lge% %ECO%Copied %lge%

SET FI=mouse.exe
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=mousedrv.ini
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=cloaking.exe
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=comcheck.ex
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=readme.exe
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=readme.txt
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=mousedrv.txt
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=comcheck.exe
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=mousecc.exe
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%
SET FI=lmouse.drv
%IFE% %SRCE%\%FI% COPY %SRCE%\%FI% %DS%\%FI%
%IFE% %FI% %ECO%Copied %FI%

SET FI=mouse.ex
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%e
%IFE% %FI%~ %ECO%Expanded %FI%e
SET FI=mousecc.ex
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%e
%IFE% %FI%~ %ECO%Expanded %FI%e
SET FI=lvmd.38
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%6
%IFE% %FI%~ %ECO%Expanded %FI%6
SET FI=lvkd.38
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%6
%IFE% %FI%~ %ECO%Expanded %FI%6
SET FI=wbuttons.ex
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%e
%IFE% %FI%~ %ECO%Expanded %FI%e
SET FI=wbuttons.dl
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%l
%IFE% %FI%~ %ECO%Expanded %FI%l
SET FI=wcursor.ex
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%e
%IFE% %FI%~ %ECO%Expanded %FI%e
SET FI=wcursor.dl
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%l
%IFE% %FI%~ %ECO%Expanded %FI%l
SET FI=wmccdlg.dl
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%l
%IFE% %FI%~ %ECO%Expanded %FI%l
SET FI=wmousecc.ex
%IFE% %SRCE%\%FI%~ %DS%\%lge% %SRCE%\%FI%~ %DS%\%FI%e
%IFE% %FI%~ %ECO%Expanded %FI%e

SET FI=mmbus
%IFE% %SRCE%\%FI%%LANGID%.ex~ %DS%\%lge% %SRCE%\%FI%%LANGID%.ex~ %DS%\%FI%.exe
%IFE% %FI%%LANGID%.ex~ %ECO%Expanded %FI%%LANGID%.exe
SET FI=wmous
%IFE% %SRCE%\%FI%%LANGID%.hl~ %DS%\%lge% %SRCE%\%FI%%LANGID%.hl~ %DS%\%FI%ecc.hlp
%IFE% %FI%%LANGID%.hl~ %ECO%Expanded %FI%ecc.hlp
SET FI=

if '%disk_x%'=='second' goto exit
CLS
c:\t.bat diskb

:diskb
rem   CLS
ECHO .
ECHO         ***********************************************
ECHO .........Please, Insert disk #2 of 2 in drive %SRCE%
ECHO         ***********************************************
ECHO .
pause

:diskin
set disk_x=second
CLS
%IFE% %SRCE%\t.bat %ECO% This is disk 1...
%IFE% %SRCE%\t.bat goto diskb
goto Winok

:exit
del %DS%\%lge%

set LANGID=
set IFE=
set LGE=
set DSK=
set SRCE=
set Dir_Mous=
set DS=
set ECO=
set disk_x=

CLS
echo ***********************************************************
echo * Work-around installation completed.                     *
echo *                                                         *
echo * Refer to the README.TXT file for instructions on how to *
echo * install the mouse driver.                               *
echo *                                                         *
echo * You will need to restart the system to activate the     *
echo * software.  Press Ctrl_Alt-Delete now to restart...      *
echo ***********************************************************

:end