@ECHO OFF
ECHO MouseWare File Installation Batch for Windows 3.1
ECHO Copyright (c) 1995, Logitech, Inc.  All Rights Reserved
IF '%1\' == '%2\' goto FORMAT
GOTO SETUP
:FORMAT
ECHO.
ECHO To run T.BAT you need to specify the source drive and the destination
ECHO drive and directory:
ECHO.
ECHO     T sourcedirectory destinationdirectory
ECHO.
ECHO For example,
ECHO if the source drive is A: and the destination directory is C:\MOUSE type:
ECHO.
ECHO     T  A:  C:\MOUSE
ECHO.
GOTO END
:SETUP
IF "%2"=="" GOTO FORMAT:

SET LANGID=ENU
IF '%3' == '' goto LANGOK
SET LANGID=%3
:LANGOK

IF NOT EXIST %2 md %2 > nul

IF EXIST %1\mouse.exe GOTO DOCOPY
IF EXIST %1\mouse.ex%% GOTO DOCOPY

IF NOT EXIST %1\wmousecc.ex%% GOTO PROMPT
:PROMPT2
ECHO.
ECHO Insert Disk 2 of 2
@PAUSE
IF NOT EXIST %1\wmousecc.ex%% GOTO PROMPT2
GOTO DOCOPY
:PROMPT
ECHO.
ECHO Insert Disk 1 of 2
@PAUSE
IF NOT EXIST %1\mouse.exe GOTO PROMPT
:DOCOPY
@ECHO ON
IF EXIST %1\mouse.exe    COPY %1\mouse.exe    %2\mouse.exe
IF EXIST %1\mousedrv.ini COPY %1\mousedrv.ini %2\mousedrv.ini    
IF EXIST %1\cloaking.exe COPY %1\cloaking.exe %2\cloaking.exe
IF EXIST %1\readme.exe   COPY %1\readme.exe   %2\readme.exe      
IF EXIST %1\readme.txt   COPY %1\readme.txt   %2\readme.txt      
IF EXIST %1\mousedrv.txt COPY %1\mousedrv.txt %2\mousedrv.txt    
IF EXIST %1\comcheck.exe COPY %1\comcheck.exe %2\comcheck.exe    
IF EXIST %1\mousecc.exe  COPY %1\mousecc.exe  %2\mousecc.exe     
IF EXIST %1\lmouse.drv   COPY %1\lmouse.drv   %2\lmouse.drv      
IF EXIST %1\mouse.ex%%    %1\LGEXPAND %1\mouse.ex%%    %2\mouse.exe
IF EXIST %1\comcheck.ex%% %1\LGEXPAND %1\comcheck.ex%% %2\comcheck.exe
IF EXIST %1\lvmd.38%%     %1\LGEXPAND %1\lvmd.38%%     %2\lvmd.386        
IF EXIST %1\lvkd.38%%     %1\LGEXPAND %1\lvkd.38%%     %2\lvkd.386        
IF EXIST %1\wmousecc.ex%% %1\LGEXPAND %1\wmousecc.ex%% %2\wmousecc.exe    
IF EXIST %1\wmccdlg.dl%%  %1\LGEXPAND %1\wmccdlg.dl%%  %2\wmccdlg.dll     
IF EXIST %1\wmous%LANGID%.hl%% %1\LGEXPAND %1\wmous%LANGID%.hl%% %2\wmousecc.hlp    
IF EXIST %1\wbuttons.ex%% %1\LGEXPAND %1\wbuttons.ex%% %2\wbuttons.exe    
IF EXIST %1\wbuttons.dl%% %1\LGEXPAND %1\wbuttons.dl%% %2\wbuttons.dll    
IF EXIST %1\wcursor.ex%%  %1\LGEXPAND %1\wcursor.ex%%  %2\wcursor.exe     
IF EXIST %1\wcursor.dl%%  %1\LGEXPAND %1\wcursor.dl%%  %2\wcursor.dll     
@ECHO OFF
@CLS
IF EXIST %1\wmousecc.ex%% goto complete
ECHO.
ECHO More files need to be copied from Disk 2.
ECHO Please insert Disk 2 in drive %1 and start the same T command:
ECHO.
ECHO      T %1 %2 %3
ECHO.
goto END
:complete    
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.                                               *
echo ***********************************************************
:END

