:rem %1 contains target directory, quoted, with trailing \

:rem -- prevent accidental execution on Windows-95
if "%1"=="" goto END

if exist %1custom.zip del %1custom.zip
if exist %1scripts.zip del %1scripts.zip

copy custom.zip %1*.*
if exist scripts.zip copy scripts.zip %1scripts.zip

:rem ****************************************************************
:rem -- "CUSTOM.ZIP" contains customized files destined for the PAL
:rem    directory.  Standard parts of "CUSTOM.ZIP" are "MAKECONN.EXE"
:rem    and "SPLASH.BMP".
:rem ****************************************************************

cdd.exe %1
unzip.exe -o custom.zip
del custom.zip

:rem *********************************************************************
:rem -- "SCRIPTS.ZIP" contains customized files destined for the "SCRIPTS"
:rem    directory underneath PAL.
:rem *********************************************************************

if not exist scripts.zip goto NOSCR
   cd scripts
   ..\unzip.exe -o ..\scripts.zip
   del ..\scripts.zip
   cd ..
:NOSCR

:rem Remove saved modem setting from previous install.
if exists MAKECONN.INI del MAKECONN.INI

:rem ************************************************************************
:rem -- If you have other steps, such as running MAKECONN, do them here.
:rem
:rem    MAKECONN parameters are:
:rem        Connect=   ... The name of the connectoid.
:rem        Init=      ... The name of the file which defines the connectoid.
:rem ************************************************************************

:rem start /wait MAKECONN.EXE Connect="Widget-Paris" Init="ppp.INI"
:rem start /wait MAKECONN.EXE Connect="Widget-Singapore" Init="Widget-Singapore.INI"
:rem start /wait MAKECONN.EXE Connect="Widget-Headquarters" Init="Widget-Headquarters.INI"
:rem start /wait MAKECONN.EXE Connect="PAL95" Init="CSERVE.INI"

:END
