@echo off
if '%1' == 'diskb' goto diskb
set LANGID=ENU
if '%2' == '' goto start
set LANGID=%2
:start
cls
echo This batch file should only be used when the SETUP
echo program fails to complete the installation of MouseWare
echo in Windows 95.
echo.
if '%1' == 'b:' goto sourceb
if '%1' == 'B:' goto sourceb
if '%1' == 'a:' goto sourcea
if '%1' == 'A:' goto sourcea
echo If you wish to use T95:
echo.
echo   - If the diskette drive is A: type
echo        T95 A:
echo   - If the diskette drive is B: type
echo        T95 B:
echo.
goto exit
:sourcea
set SOURCE=A:
goto sourceok
:sourceb
set SOURCE=B:
:sourceok
echo.
echo T95 creates the directory C:\LOGITECH\MOUSE,
echo copies the program files, and updates the registry accordingly.
echo You have selected the source diskette drive %SOURCE%
echo If this is not correct, press Ctrl-C now to exit.
echo.
pause
if exist %SOURCE%\LMOUSE.VXD goto checked
echo.
echo T95 cannot find the MouseWare files on drive %SOURCE%
echo Type T95 again for instructions.
goto exit
:checked
if '%windir%' == '' set windir=%winbootdir%
if not '%windir%' == '' goto winok
echo T95 cannot find Windows 95 environment variable winbootdir
echo to locate the Windows files.
goto exit
:winok
md c:\logitech
md c:\logitech\mouse
md c:\logitech\mouse\system
md c:\logitech\mouse\pointers
%SOURCE%
cd c:\logitech\mouse\system
IF EXIST mouse.exe  copy mouse.exe  c:\logitech\mouse\mouse.exe
IF EXIST readme.txt copy readme.txt c:\logitech\mouse\readme.txt
IF EXIST mouse.ex%% lgexpand mouse.ex%% c:\logitech\mouse\mouse.exe
IF EXIST lmouse.vxd copy lmouse.vxd    %windir%\System\lmouse.vxd
IF EXIST lmouse16.dl%% lgexpand lmouse16.dl%% %windir%\System\lmouse16.dll
IF EXIST lmouse32.dl%% lgexpand lmouse32.dl%% %windir%\System\lmouse32.dll
rem registry modifications
lgexpand t95.re%%  c:t95.reg  
%windir%\regedit c:t95.reg
copy lgexpand.exe c:
copy t95.bat c:
c:t95 diskb
goto exit
:diskb
if exist %SOURCE%basic.dl%% goto diskin
echo Insert disk #2 of 2 in drive %SOURCE%
pause
if not exist %SOURCE%basic.dl%% goto diskb
:diskin
cd c:\logitech\mouse\system
c:\logitech\mouse\system\lgexpand basic.dl%%    c:basic.dll   
c:\logitech\mouse\system\lgexpand ccmsghk.dl%%  c:ccmsghk.dll 
c:\logitech\mouse\system\lgexpand ccres%LANGID%.dl%% c:ccresrce.dll
c:\logitech\mouse\system\lgexpand ccresglb.dl%% c:ccresglb.dll
c:\logitech\mouse\system\lgexpand ccstmglb.dl%% c:ccstmglb.dll
c:\logitech\mouse\system\lgexpand ccust%LANGID%.dl%% c:ccustom.dll
c:\logitech\mouse\system\lgexpand cmousecc.dl%% c:cmousecc.dll
c:\logitech\mouse\system\lgexpand devices.dl%%  c:devices.dll 
c:\logitech\mouse\system\lgexpand em_exec.ex%%  c:em_exec.exe 
c:\logitech\mouse\system\lgexpand eventex.dl%%  c:eventex.dll 
c:\logitech\mouse\system\lgexpand cmousecc.in%% %windir%\cmousecc.ini
c:\logitech\mouse\system\lgexpand comnctr.dl%%  %windir%\System\comnctr.dll 
c:\logitech\mouse\system\lgexpand logilang.dl%% %windir%\System\logilang.dll
c:\logitech\mouse\system\lgexpand lmous%LANGID%.hl%% %windir%\Help\lmouse.hlp   
c:\logitech\mouse\system\lgexpand lmous%LANGID%.cn%% %windir%\Help\lmouse.cnt   
c:\logitech\mouse\system\lgexpand lmoui%LANGID%.cn%% %windir%\Help\lmousei.cnt   
cd c:\logitech\mouse\pointers
copy *.cur c:
del c:\logitech\mouse\system\t95.reg
del c:\logitech\mouse\system\lgexpand.exe
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.  Go to the Start menu and select Shut Down... *
echo ***********************************************************
:exit
