@echo off
if '%1' == 'diskb' goto diskb
set LANGID=ENU
if '%2' == '' goto start
set LANGID=%2
:start
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 95.                                                 *
echo *                                                                 *
echo *  Run it from DOS mode.                                          *
echo *  DO NOT run it from a Windows DOS box.                          *
echo *******************************************************************
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 *******************************************************************
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 *                                                                 *
echo * If this is not correct, press Ctrl-C now to exit.               *
echo *******************************************************************
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 mouse.exe  ECHO .........Copied mouse.exe
IF EXIST readme.txt copy readme.txt c:\logitech\mouse\readme.txt
IF EXIST readme.txt ECHO .........Copied readme.txt
IF EXIST mousedrv.txt copy mousedrv.txt c:\logitech\mouse\mousedrv.txt
IF EXIST mousedrv.txt ECHO .........Copied mousedrv.txt
IF EXIST mouse.ex~ lgexpand mouse.ex~ c:\logitech\mouse\mouse.exe
IF EXIST mouse.ex~ ECHO .........Expanded mouse.exe
IF EXIST lmouse.vxd copy lmouse.vxd    %windir%\System\lmouse.vxd
rem IF EXIST lmouse16.dl~ lgexpand lmouse16.dl~ %windir%\System\lmouse16.dll
rem IF EXIST lmouse16.dl~ ECHO .........Expanded lmouse16.dll
rem IF EXIST lmouse32.dl~ lgexpand lmouse32.dl~ %windir%\System\lmouse32.dll
rem IF EXIST lmouse32.dl~ ECHO .........Expanded lmouse32.dll

IF EXIST cmousecc.in~ lgexpand cmousecc.in~ %windir%\cmousecc.ini
IF NOT EXIST cmousecc.in~ ECHO .........cmousecc.ini NOT FOUND OR CORRUPT FILE !
IF EXIST cmousecc.in~ ECHO .........Expanded cmousecc.ini

rem registry modifications
lgexpand t95.re~  c:t95.reg
ECHO .........Expanded t95.reg
%windir%\regedit c:t95.reg
copy lgexpand.exe c:
rem   ECHO .........Copied lgexpand.exe
copy t95.bat c:
rem   ECHO .........Copied t95.bat
c:t95 diskb
goto exit
:diskb
IF EXIST %SOURCE%basic.dl~ GOTO diskin
ECHO .
ECHO         ***********************************************
ECHO .........Please, Insert disk #2 of 2 in drive %SOURCE%
ECHO         ***********************************************
ECHO .
pause
if not exist %SOURCE%basic.dl~ goto diskb
:diskin
cd c:\logitech\mouse\system

IF EXIST mmbus%LANGID%.ex~ c:\logitech\mouse\system\lgexpand mmbus%LANGID%.ex~ c:\logitech\mouse\mmbus.exe
IF EXIST mmbus%LANGID%.ex~ ECHO .........Expanded mmbus%LANGID%.exe

IF EXIST lmouse16.dl~ c:\logitech\mouse\system\lgexpand lmouse16.dl~ %windir%\System\lmouse16.dll
IF EXIST lmouse16.dl~ ECHO .........Expanded lmouse16.dll
IF EXIST lmouse32.dl~ c:\logitech\mouse\system\lgexpand lmouse32.dl~ %windir%\System\lmouse32.dll
IF EXIST lmouse32.dl~ ECHO .........Expanded lmouse32.dll
c:\logitech\mouse\system\lgexpand basic.dl~    c:basic.dll
IF NOT EXIST basic.dl~ ECHO .........basic.dll NOT FOUND OR CORRUPT FILE !
IF EXIST basic.dl~ ECHO .........Expanded basic.dll
c:\logitech\mouse\system\lgexpand ccmsghk.dl~  c:ccmsghk.dll 
IF NOT EXIST ccmsghk.dl~ ECHO .........ccmsghk.dll NOT FOUND OR CORRUPT FILE !
IF EXIST ccmsghk.dl~ ECHO .........Expanded ccmsghk.dll
c:\logitech\mouse\system\lgexpand ccres%LANGID%.dl~ c:ccresrce.dll
IF NOT EXIST ccres%LANGID%.dl~ ECHO .........ccres%LANGID%.dll NOT FOUND OR CORRUPT FILE !
IF EXIST ccres%LANGID%.dl~ ECHO .........Expanded ccres%LANGID%.dll
c:\logitech\mouse\system\lgexpand ccresglb.dl~ c:ccresglb.dll
IF NOT EXIST ccresglb.dl~ ECHO .........ccresglb.dll NOT FOUND OR CORRUPT FILE !
IF EXIST ccresglb.dl~ ECHO .........Expanded ccresglb.dll
c:\logitech\mouse\system\lgexpand ccstmglb.dl~ c:ccstmglb.dll
IF NOT EXIST ccstmglb.dl~ ECHO .........ccstmglb.dll NOT FOUND OR CORRUPT FILE !
IF EXIST ccstmglb.dl~ ECHO .........Expanded c:ccstmglb.dll

IF EXIST ccust%LANGID%.dl~ c:\logitech\mouse\system\lgexpand ccust%LANGID%.dl~ c:ccustom.dll
IF EXIST ccust%LANGID%.dl~ ECHO .........Expanded ccust%LANGID%.dll
IF EXIST ccustom.dl~ c:\logitech\mouse\system\lgexpand ccustom.dl~ c:ccustom.dll
IF EXIST ccustom.dl~ ECHO .........Expanded ccustom.dll

c:\logitech\mouse\system\lgexpand cmousecc.dl~ c:cmousecc.dll
IF NOT EXIST cmousecc.dl~ ECHO .........cmousecc.dll NOT FOUND OR CORRUPT FILE !
IF EXIST cmousecc.dl~ ECHO .........Expanded cmousecc.dll
c:\logitech\mouse\system\lgexpand devices.dl~  c:devices.dll 
IF NOT EXIST devices.dl~ ECHO .........devices.dll NOT FOUND OR CORRUPT FILE !
IF EXIST devices.dl~ ECHO .........Expanded devices.dll
c:\logitech\mouse\system\lgexpand em_exec.ex~  c:em_exec.exe 
IF NOT EXIST em_exec.ex~ ECHO .........em_exec.ex~ NOT FOUND OR CORRUPT FILE !
IF EXIST em_exec.ex~ ECHO .........Expanded em_exec.exe
c:\logitech\mouse\system\lgexpand eventex.dl~  c:eventex.dll 
IF NOT EXIST eventex.dl~ ECHO .........eventex.dll NOT FOUND OR CORRUPT FILE !
IF EXIST eventex.dl~ ECHO .........Expanded eventex.dll

ECHO OFF
c:\logitech\mouse\system\lgexpand lgtchpad.dl~ c:lgtchpad.dll   
ECHO .........Expanded lgtchpad.dll
rem   c:\logitech\mouse\system\lgexpand lgwheel.dl~  c:lgwheel.dll   
rem   ECHO .........Expanded lgwheel.dll

rem c:\logitech\mouse\system\lgexpand cmousecc.in~ %windir%\cmousecc.ini
rem IF NOT EXIST cmousecc.in~ ECHO .........cmousecc.ini NOT FOUND OR CORRUPT FILE !
rem IF EXIST cmousecc.in~ ECHO .........Expanded cmousecc.ini
c:\logitech\mouse\system\lgexpand comnctr.dl~  %windir%\System\comnctr.dll 
IF NOT EXIST comnctr.dl~ ECHO .........comnctr.dll NOT FOUND OR CORRUPT FILE !
IF EXIST comnctr.dl~ ECHO .........Expanded comnctr.dll
c:\logitech\mouse\system\lgexpand logilang.dl~ %windir%\System\logilang.dll
IF NOT EXIST logilang.dl~ ECHO .........logilang.dll NOT FOUND OR CORRUPT FILE !
IF EXIST logilang.dl~ ECHO .........Expanded logilang.dll

c:\logitech\mouse\system\lgexpand lguicom.dl~  %windir%\System\lguicom.dll   
ECHO .........Expanded lguicom.dll

c:\logitech\mouse\system\lgexpand lmous%LANGID%.hl~ %windir%\Help\lmouse.hlp   
IF NOT EXIST lmous%LANGID%.hl~ ECHO .........lmous%LANGID%.hlp NOT FOUND OR CORRUPT FILE !
IF EXIST lmous%LANGID%.hl~ ECHO .........Expanded lmous%LANGID%.hlp to lmouse.hlp
c:\logitech\mouse\system\lgexpand lmous%LANGID%.cn~ %windir%\Help\lmouse.cnt   
IF NOT EXIST lmous%LANGID%.cn~ ECHO .........lmous%LANGID%.cnt NOT FOUND OR CORRUPT FILE !
IF EXIST lmous%LANGID%.cn~ ECHO .........Expanded lmous%LANGID%.cnt to lmouse.cnt
c:\logitech\mouse\system\lgexpand lmoui%LANGID%.cn~ %windir%\Help\lmousei.cnt   
IF NOT EXIST lmoui%LANGID%.cn~ ECHO .........lmoui%LANGID%.cnt NOT FOUND OR CORRUPT FILE !
IF EXIST lmoui%LANGID%.cn~ ECHO .........Expanded lmoui%LANGID%.cnt to lmousei.cnt

cd c:\logitech\mouse\pointers

c:\logitech\mouse\system\lgexpand LGBAPPST.CU~  C:LGBAPPST.CUR
IF NOT EXIST LGBAPPST.CU~ ECHO .........LGBHELP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBAPPST.CU~ ECHO .........Expanded LGBAPPST.cur
c:\logitech\mouse\system\lgexpand LGBARROW.CU~  C:LGBARROW.CUR
IF NOT EXIST LGBARROW.CU~ ECHO .........LGBHELP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBARROW.CU~ ECHO .........Expanded LGBARROW.cur
c:\logitech\mouse\system\lgexpand LGBHELP.CU~  C:LGBHELP.CUR
IF NOT EXIST LGBHELP.CU~ ECHO .........LGBHELP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBHELP.CU~ ECHO .........Expanded LGBHELP.cur
c:\logitech\mouse\system\lgexpand LGBUP.CU~  C:LGBUP.CUR
IF NOT EXIST LGBUP.CU~ ECHO .........LGBUP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBUP.CU~ ECHO .........Expanded LGBUP.cur
c:\logitech\mouse\system\lgexpand LGBWAIT.CU~  C:LGBWAIT.CUR
IF NOT EXIST LGBWAIT.CU~ ECHO .........LGBWAIT.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBWAIT.CU~ ECHO .........Expanded LGBWAIT.cur
c:\logitech\mouse\system\lgexpand LGBZALL.CU~  C:LGBZALL.CUR
IF NOT EXIST LGBZALL.CU~ ECHO .........LGBZALL.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBZALL.CU~ ECHO .........Expanded LGBZALL.cur
c:\logitech\mouse\system\lgexpand LGBZNESW.CU~  C:LGBZNESW.CUR
IF NOT EXIST LGBZNESW.CU~ ECHO .........LGBZNESW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBZNESW.CU~ ECHO .........Expanded LGBZNESW.cur
c:\logitech\mouse\system\lgexpand LGBZNS.CU~  C:GBZNS.CUR
IF NOT EXIST LGBZNS.CU~ ECHO .........LGBZNS.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBZNS.CU~ ECHO .........Expanded LGBZNS.cur
c:\logitech\mouse\system\lgexpand LGBZNWSE.CU~  C:LGBZNWSE.CUR
IF NOT EXIST LGBZNWSE.CU~ ECHO .........LGBZNWSE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBZNWSE.CU~ ECHO .........Expanded LGBZNWSE.cur
c:\logitech\mouse\system\lgexpand LGBZWE.CU~  C:LGBZWE.CUR
IF NOT EXIST LGBZWE.CU~ ECHO .........LGBZWE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGBZWE.CU~ ECHO .........Expanded LGBZWE.cur
c:\logitech\mouse\system\lgexpand LGEAPPST.CU~  C:LGEAPPST.CUR
IF NOT EXIST LGEAPPST.CU~ ECHO .........LGEAPPST.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEAPPST.CU~ ECHO .........Expanded LGEAPPST.cur
c:\logitech\mouse\system\lgexpand LGEARROW.CU~  C:LGEARROW.CUR
IF NOT EXIST LGEARROW.CU~ ECHO .........LGEARROW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEARROW.CU~ ECHO .........Expanded LGEARROW.cur
c:\logitech\mouse\system\lgexpand LGECROSS.CU~  C:LGECROSS.CUR
IF NOT EXIST LGECROSS.CU~ ECHO .........LGECROSS.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGECROSS.CU~ ECHO .........Expanded LGECROSS.cur
c:\logitech\mouse\system\lgexpand LGEHELP.CU~  C:LGEHELP.CUR
IF NOT EXIST LGEHELP.CU~ ECHO .........LGEHELP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEHELP.CU~ ECHO .........Expanded LGEHELP.cur
c:\logitech\mouse\system\lgexpand LGEIBEAM.CU~  C:LGEIBEAM.CUR
IF NOT EXIST LGEIBEAM.CU~ ECHO .........LGEIBEAM.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEIBEAM.CU~ ECHO .........Expanded LGEIBEAM.cur
c:\logitech\mouse\system\lgexpand LGENO.CU~  C:LGENO.CUR
IF NOT EXIST LGENO.CU~ ECHO .........LGENO.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGENO.CU~ ECHO .........Expanded LGENO.cur
c:\logitech\mouse\system\lgexpand LGEUP.CU~  C:LGEUP.CUR
IF NOT EXIST LGEUP.CU~ ECHO .........LGEUP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEUP.CU~ ECHO .........Expanded LGEUP.cur
c:\logitech\mouse\system\lgexpand LGEWAIT.CU~  C:LGEWAIT.CUR
IF NOT EXIST LGEWAIT.CU~ ECHO .........LGEWAIT.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEWAIT.CU~ ECHO .........Expanded LGEWAIT.cur
c:\logitech\mouse\system\lgexpand LGEZALL.CU~  C:LGEZALL.CUR
IF NOT EXIST LGEZALL.CU~ ECHO .........LGEZALL.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEZALL.CU~ ECHO .........Expanded LGEZALL.cur
c:\logitech\mouse\system\lgexpand LGEZNESW.CU~  C:LGEZNESW.CUR
IF NOT EXIST LGEZNESW.CU~ ECHO .........LGEZNESW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEZNESW.CU~ ECHO .........Expanded LGEZNESW.cur
c:\logitech\mouse\system\lgexpand LGEZNS.CU~  C:LGEZNS.CUR
IF NOT EXIST LGEZNS.CU~ ECHO .........LGEZNSE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEZNS.CU~ ECHO .........Expanded LGEZNS.cur
c:\logitech\mouse\system\lgexpand LGEZNWSE.CU~  C:LGEZNWSE.CUR
IF NOT EXIST LGEZNWSE.CU~ ECHO .........LGEZNWSE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEZNWSE.CU~ ECHO .........Expanded LGEZNWSE.cur
c:\logitech\mouse\system\lgexpand LGEZWE.CU~  C:LGEZWE.CUR
IF NOT EXIST LGEZWE.CU~ ECHO .........LGEZWE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGEZWE.CU~ ECHO .........Expanded LGEZWE.cur
c:\logitech\mouse\system\lgexpand LGLAPPST.CU~  C:LGLAPPST.CUR
IF NOT EXIST LGLAPPST.CU~ ECHO .........LGLAPPST.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGLAPPST.CU~ ECHO .........Expanded LGLAPPST.cur
c:\logitech\mouse\system\lgexpand LGLARROW.CU~  C:LGLARROW.CUR
IF NOT EXIST LGLARROW.CU~ ECHO .........LGLARROW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGLARROW.CU~ ECHO .........Expanded LGLARROW.cur
c:\logitech\mouse\system\lgexpand LGLHELP.CU~  C:LGLHELP.CUR
IF NOT EXIST LGLHELP.CU~ ECHO .........LMBAPPST.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LGLHELP.CU~ ECHO .........Expanded LGLHELP.cur
c:\logitech\mouse\system\lgexpand LMBAPPST.CU~  C:LMBAPPST.CUR
IF NOT EXIST LMBAPPST.CU~ ECHO .........LMBAPPST.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBAPPST.CU~ ECHO .........Expanded LMBAPPST.cur
c:\logitech\mouse\system\lgexpand LMBARROW.CU~  C:LMBARROW.CUR
IF NOT EXIST LMBARROW.CU~ ECHO .........LMBARROW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBARROW.CU~ ECHO .........Expanded LMBARROW.cur
c:\logitech\mouse\system\lgexpand LMBCROSS.CU~  C:LMBCROSS.CUR
IF NOT EXIST LMBCROSS.CU~ ECHO .........LMBCROSS.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBCROSS.CU~ ECHO .........Expanded LMBCROSS.cur
c:\logitech\mouse\system\lgexpand LMBHELP.CU~  C:LMBHELP.CUR
IF NOT EXIST LMBHELP.CU~ ECHO .........LMBHELP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBHELP.CU~ ECHO .........Expanded LMBHELP.cur
c:\logitech\mouse\system\lgexpand LMBIBEAM.CU~  C:LMBIBEAM.CUR
IF NOT EXIST LMBIBEAM.CU~ ECHO .........LMBUP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBIBEAM.CU~ ECHO .........Expanded LMBIBEAM.cur
c:\logitech\mouse\system\lgexpand LMBUP.CU~  C:LMBUP.CUR
IF NOT EXIST LMBUP.CU~ ECHO .........LMBUP.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBUP.CU~ ECHO .........Expanded LMBUP.cur
c:\logitech\mouse\system\lgexpand LMBWAIT.CU~  C:LMBWAIT.CUR
IF NOT EXIST LMBWAIT.CU~ ECHO .........LMBWAIT.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBWAIT.CU~ ECHO .........Expanded LMBWAIT.cur
c:\logitech\mouse\system\lgexpand LMBZALL.CU~  C:LMBZALL.CUR
IF NOT EXIST LMBZALL.CU~ ECHO .........LMBZALL.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBZALL.CU~ ECHO .........Expanded LMBZALL.cur
c:\logitech\mouse\system\lgexpand LMBZNESW.CU~  C:LMBZNESW.CUR
IF NOT EXIST LMBZNESW.CU~ ECHO .........LMBZNESW.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBZNESW.CU~ ECHO .........Expanded LMBZNESW.cur
c:\logitech\mouse\system\lgexpand LMBZNS.CU~  C:LMBZNS.CUR
IF NOT EXIST LMBZNS.CU~ ECHO .........LMBZWE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBZNS.CU~ ECHO .........Expanded LMBZNS.cur
c:\logitech\mouse\system\lgexpand LMBZNWSE.CU~  C:LMBZNWSE.CUR
IF NOT EXIST LMBZNWSE.CU~ ECHO .........LMBZNWSE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBZNWSE.CU~ ECHO .........Expanded LMBZNWSE.cur
c:\logitech\mouse\system\lgexpand LMBZWE.CU~  C:LMBZWE.CUR
IF NOT EXIST LMBZWE.CU~ ECHO .........LMBZWE.cur NOT FOUND OR CORRUPT FILE !
IF EXIST LMBZWE.CU~ ECHO .........Expanded LMBZWE.cur

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.  Press Ctrl_Alt-Delete now to restart...      *
echo ***********************************************************
:exit
