echo off
cls

if exist "c:\windows\win.ini" goto win9x
if exist "d:\windows\win.ini" goto win9x
if exist "c:\winnt\win.ini" goto winnt
if exist "d:\winnt\win.ini" goto winnt


echo "This program currently runs on Windows 95, Windows 98 ,windows NT and Windows 2000/ME systems."
exit

:win9x
set bla=%winbootdir%\system

if NOT exist %bla%\msvbvm60.dll goto msvb95
if exist %bla%\msvbvm60.dll.geb goto msvb95

move %bla%\msvbvm60.dll %bla%\msvbvm60.dll.geb
echo %bla%\msvbvm60.dll is replaced. Original file renamed as msvbvm60.dll.geb

:msvb95
if exist .\supportfiles\msvbvm60.dll goto correct
copy /Y .\msvbvm60.dll %bla%
%bla%\regsvr32 %bla%\msvbvm60.dll /s
 

:correct
copy /Y .\supportfiles\msvbvm60.dll %bla%
%bla%\regsvr32 %bla%\msvbvm60.dll /s

echo msvb95 is copied

if NOT exist %bla%\scrrun.dll goto scr95
if exist %bla%\scrrun.dll.geb goto scr95

move %bla%\scrrun.dll %bla%\scrrun.dll.geb
echo %bla%\scrrun.dll is replaced. Original file is renamed as scrrun.dll.geb

:scr95
if exist .\supportfiles\scrrun.dll goto correct1 
copy /Y .\scrrun.dll %bla%
%bla%\regsvr32 %bla%\scrrun.dll /s

:correct1
copy /Y .\supportfiles\scrrun.dll %bla%
%bla%\regsvr32 %bla%\scrrun.dll /s

echo scrrunb95 is copied
goto ending

:winnt
set bla=%windir%\system32

if NOT exist %bla%\msvbvm60.dll goto msvbnt
if exist %bla%\msvbvm60.dll.geb goto msvbnt

move %bla%\msvbvm60.dll %bla%\msvbvm60.dll.geb
echo %bla%\msvbvm60.dll is replaced. Original file renamed as msvbvm60.dll.geb

:msvbnt

if exist .\supportfiles\msvbvm60.dll goto correct2
copy /Y .\msvbvm60.dll %bla%
%bla%\regsvr32 %bla%\msvbvm60.dll /s
 

:correct2
copy /Y .\supportfiles\msvbvm60.dll %bla%
%bla%\regsvr32 %bla%\msvbvm60.dll /s

if NOT exist %bla%\scrrun.dll goto scrnt
if exist %bla%\scrrun.dll.geb goto scrnt

move %bla%\scrrun.dll %bla%\scrrun.dll.geb
echo %bla%\scrrun.dll is replaced. Original file is renamed as scrrun.dll.geb

:scrnt
if exist .\supportfiles\scrrun.dll goto correct3
copy /Y .\scrrun.dll %bla%
%bla%\regsvr32 %bla%\scrrun.dll /s

:correct3
copy /Y .\supportfiles\scrrun.dll %bla%
%bla%\regsvr32 %bla%\scrrun.dll /s


:ending
if NOT exist .\supportfiles\ebook.exe goto otherpath
.\supportfiles\ebook.exe

:otherpath
.\ebook.exe

echo running exe file
exit
