VEWD Install Batch File

@echo off
set ver1=31
set ver2=3.11
if     "%1" == "" goto getparm
if     "%2" == "" goto getparm
if not "%3" == "" goto gotparm
:getparm
echo ÿ
echo Usage: VEWDINST source-drive destination-drive destination-path
echo Where source-drive is the location of the installation files,
echo Where destination-drive is the drive where VEWD will be installed, and
echo Where destination-path is where to install VEWD
echo Include the colon with the drive letter.
echo ÿ
echo Example:  VEWDINST A: C: \HAM\VEWD
echo ÿ
goto fini

:gotparm
echo ÿ
echo Installing VEWD Version %ver2%, please wait
echo ÿ
set src=%1
set dst=%2
set pth=%3
rem To select pkunzjr.com as unzipper, remove rem from front of next line.
rem set prg=pkunzjr -o
rem To select unzip.exe as unzipper, remove rem from front of next line.
set prg=unzip -o

mkdir %dst%%pth%		>NUL:
echo test >%dst%%pth%\test.del
if exist %dst%%pth%\test.del goto doit
echo Path %dst%%pth% does not exist
echo Please create manually and rerun installation
goto fini
echo 

:doit
del %dst%%pth%\test.del		>NUL:
%dst%				>NUL:
cd %pth%			>NUL:
mkdir data			>NUL:
mkdir forms			>NUL:
mkdir docs			>NUL:
copy %src%form*.zip forms/v	>NUL:
copy %src%emptydb.zip data/v	>NUL:
copy %src%vewdman.zip docs/v	>NUL:
copy %src%htmlman.zip docs/v	>NUL:
%src%%prg% %src%vewd%ver1%e	>NUL:

if exist victimg.dat goto docs
%src%%prg% data\emptydb		>NUL:

:docs
cd docs
%src%%prg% %src%htmlman.zip 	>NUL:
cd ..

echo ÿ
echo VEWD Version %ver2% has been installed
echo ÿ

goto fini

:fini
set src=
set dst=
set pth=
set prg=


Last Modified: 14 June 2002
Jim Heedles: ww1y@arrl.net