home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 September
/
PCWorld_2000-09_cd.bin
/
Software
/
TemaCD
/
ahwb
/
rwsetup.bat
< prev
next >
Wrap
DOS Batch File
|
2000-06-12
|
10KB
|
326 lines
@echo off
rem ***********************************************************************
rem -----------------------------------------------------------------------
rem Beginn ENV-Stub:
rem
rem Für diesen Stub: Version B 1.1(mod) (C) 1999-2000 by André Holzhey
rem -----------------------------------------------------------------------
:INIstub
rem echo INIstub
if a%1 == a/INI if not a%/INI% == a/INI goto %2
if not a%/INI% == a/INI goto Normstrt
set /INI=
goto %INIlabel%
:NormStrt
:ENVstub
rem Test Windows NT (it's incompatible, but it doesn't requires an ENV-Stub)
if not "%OS%" == "Windows_NT" %comspec% /E:16300 /C %0 /INI UmgRestart %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
if not "%OS%" == "Windows_NT" goto PrgEnde
echo.%COMSPEC%/ | find /I "\cmd.exe/" > nul
if not errorlevel 1 goto UmgPass
echo restarting ...
cmd.exe /C %0 /INI UmgRestart %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto PrgEnde
:UmgRestart
shift
shift
shift
:UmgPass
rem -----------------------------------------------------------------------
rem
rem Ende ENV-Stub .
rem
rem ******* Ab hier dürfen Umgebungsvariablen verwendet werden !!! ******
rem
rem
rem Achtung: dieser Header erwartet am Ende dieses Programms die
rem Sprungmarke PrgEnde (sonst gibts eine unschöne Fehlermeldung)
rem -----------------------------------------------------------------------
rem ***********************************************************************
echo.
echo ╔══════════════════════════════════════════════════════════════════╗
echo ║ ║
echo ║ RWSETUP.BAT - installation program launcher for the ║
echo ║ English-German dictionary Version 1.49b ║
echo ║ for Winword 7.0 and higher (and possibly for Winword6!) ║
echo ║ ║
echo ║ (C) 1997-2000 by André Holzhey ║
echo ║ ║
echo ║ holzhey@physik.tu-dresden.de ║
echo ║ http://www.phy.tu-dresden.de/~holzhey/ah-wobu ║
echo ║ ║
echo ║ Für dieses Programm gilt die General Public License. ║
echo ║ Der Autor übernimmt keine Gewähr. ║
echo ║ Für Details siehe 'license.txt' ║
echo ║ ║
echo ║ This program runs under GPL. It comes with absolutely no ║
echo ║ warranty. For Details see 'license.txt' ║
echo ║ ║
echo ╚══════════════════════════════════════════════════════════════════╝
echo.
echo. Die Installationsroutine wird vorbereitet. Bitte haben Sie etwas Geduld...
echo.
echo. Preparing Setup. Please be patient...
echo.
rem Teste Win31/Win9x/NTx, wrong OS
rem --------------------------------
if "%OS%" == "Windows_NT" goto OSOK
rem teste, ob DOS95
if "%windir%" == "" goto WinError
rem teste, ob DOS6.2 & Win3.1:
echo."%winbootdir%" | find "\" > nul
if errorlevel 1 goto WinError
:OSOK
rem create an unique tempfile-name
rem ----------------------------------
set tmpregfil=%TEMP%\ahwbi15b-19276255697845.rgd
if exist %tmpregfil% del %tmpregfil%
rem check if a word .GE. 6 is installed. (don't get cheated by Wordpad!)
rem --------------------------------------------------------------------
echo searching MS WinWord...
set Wordinst=0
call %0 /INI CheckRegKey Wordinst "HKEY_CLASSES_ROOT\Word.Basic" "*"
if %Wordinst% == 0 goto WordError
echo ...found!
rem check if a Word with VBA is installed (Word .GE. 8)
rem --------------------------------------------------------------------
set WordVBAinst=0
call %0 /INI CheckRegKey WordVBAinst "HKEY_CLASSES_ROOT\Word.Application" "*"
if exist %tmpregfil% del %tmpregfil%
rem setze SFX-Information
rem (wenn die Datei existiert, gilt dies für Setup.DOC als Zeichen für
rem SFX - Mechanismus und bevorstehende Selbstlöschung)
if not "%1" == "/SFX" if exist ahwbsfx.lck del ahwbsfx.lck
if not "%1" == "/SFX" goto nachCRSF
echo.>ahwbsfx.lck
:nachCRSF
echo.
echo.
echo Starte den auf MS Word basierenden Teil der Installation...
echo.
echo. launch now MS Word based Setup...
echo.
echo.
:RunWait
rem und sonst:
rem hier '/Wait' , damit ggf. die
rem die Original-Dateien gelöscht werden können.
echo Warte auf das Beenden von Word / waiting for Word to shut down...
if %WordVBAinst% == 0 start /wait /max setup.doc
if %WordVBAinst% == 1 start /wait /max winword.exe /lsetup.doc
if errorlevel 1 goto ErrLaunchWord
echo.
echo.Winword finished.
goto EndLaunchWord
rem an error occured, a message was displayed.:
:BackErrLaunch
rem Successfully Launched Setup.doc:
:EndLaunchWord
rem Remove Sourcefiles, if started from SFX
if not "%1" == "/SFX" goto EndDelFiles
if exist "C:\Please not, I'm the AH-WOBU developper" pause
echo.
echo removing temporary files...
echo.
rem wait until the temporary bat-file(called by setup.doc) has finished, since sleep32.exe may not
rem be deleted when running.
if exist sleep32.exe sleep32.exe 7000
if exist ah-wobu.do_ del ah-wobu.do_
if exist ger-eng.tx_ del ger-eng.tx_
if exist license_.txt del license_.txt
if exist Readme_.Doc del Readme_.Doc
if exist lesmich_.doc del lesmich_.doc
if exist file_id.diz del file_id.diz
if exist Info.txt del Info.txt
if exist echosfn.exe del echosfn.exe
if exist ah-wobu.i1_ del ah-wobu.i1_
if exist ah-wobu.ic_ del ah-wobu.ic_
if exist setup.doc del setup.doc
if exist rwsetup.pif del rwsetup.pif
if exist chdme.pif del chdme.pif
if exist chdme.bat del chdme.bat
if exist chdme.exe del chdme.exe
if exist deftpl.pi_ del deftpl.pi_
if exist ctpl_nt.pi_ del ctpl_nt.pi_
if exist ctpl_9x.pi_ del ctpl_9x.pi_
if exist NativVBA.DOT del NativVBA.DOT
if exist w6only.DOT del w6only.DOT
if exist sleep32.exe del sleep32.exe
if exist setup.exe del setup.exe
if exist dbg.doc del dbg.doc
if exist ahwbsfx.lck del ahwbsfx.lck
if exist setup.pif del setup.pif
rem if exist del
goto deleteme
if exist deleteme.ex_ del deleteme.ex_
if exist deleteme.pi_ del deleteme.pi_
echo ** Selbstlöschung. Die folgende Meldung kann ignoriert werden: **
echo ** Self deletion. Please ignore the following message: **
echo.
if exist rwsetup.bat del rwsetup.bat
:deleteme
rem besser:
rem before Uninstall, deleteme is possibly copied to %TEMP%
set deleteme=
if exist deletem_.exe set deleteme=deletem_.exe
if not exist deletem_.exe if exist %TEMP%\deletem_.exe set deleteme=%TEMP%\deletem_.exe
if not exist %0 if exist %0.bat start /min %deleteme% 5 %0.bat
if exist %0 start /min %deleteme% 5 %0
exit
:EndDelFiles
goto PrgEnde
rem ------------------------------------------------------------
rem a function
rem ------------------------------------------------------------
:CheckRegKey
rem Params: 3 DestinationVar, 4 RegKey, 5 "RegEntry" or "*" for any
rem the tempfile will not be deleted after successful operation. It might be used by the calling procedure.
rem Note: the find-command will also search all subkeys
set %3=0
if exist %tmpregfil% del %tmpregfil%
start /wait regedit /E %tmpregfil% %4
if not exist %tmpregfil% goto CRKfalse
echo /%5/ | find "/""*""/" > nul
if not errorlevel 1 goto CRKTrue
rem check Regvalue
find /I %5 < %tmpregfil% > nul
if errorlevel 1 goto CRKFalse
:CRKtrue
set %3=1
:CRKFalse
goto PrgEnde
:WordError
echo.
echo.
echo.
echo. Dieses Programm erfordert Microsoft Word für Windows, Version 6.0 oder höher
echo.
echo. This program requires Microsoft Word for Windows, version 6.0 or higher.
echo.
echo.
if not "%OS%" == "Windows_NT" pause
goto ende
:WinError
echo.
echo.
echo.
echo. 'André Holzheys Wörterbuch' benötigt mindestens Windows 3.1, dieses
echo. Installationsscript ist dagegen nur für Windows95/WindowsNT erforderlich.
echo.
echo. Um André Holzheys Wörterbuch unter Windows 3.1 zu installieren, öffne
echo. die Datei 'SETUP.DOC' einfach in MS Word 6.0 für Windows.
echo.
echo.
echo. 'André Holzheys dictionary' requires at least Windows 3.1 or newer, but
echo. this batch installation script is only recommended under Windows 95/98 or
echo. Windows NT (and anything newer).
echo. To Install the dictionary on Windows3.1 simply open the file 'SETUP.DOC'
echo. in MS Word 6.0 for Windows
echo.
echo.
if not "%OS%" == "Windows_NT" pause
goto ende
:ErrLaunchWord
echo.
echo.
echo.
echo. Das Setup-Programm konnte nicht gestartet werden. Um das Wörterbuch
echo. trotzdem zu installieren, öffne die Datei 'SETUP.DOC' in Word (z.B. durch
echo. Doppelklick).
echo.
echo. The installation program could not be launched. To get the dictionary
echo. installed, try to open the file 'SETUP.DOC' in Word (e.g. by
echo. doubleclicking it)
echo.
echo.
if not "%OS%" == "Windows_NT" pause
goto BackErrLaunch
:ende
echo RWSETUP has finished.
:PrgEnde
:Prgende