home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 28 Fixes4x
/
28-Fixes4x.zip
/
v4rsu.zip
/
instapar.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-10-14
|
4KB
|
118 lines
/******************************************************************************/
/* REXX PROGRAM to install the TCP/IP stack files for the latest Merlin APAR */
/* TCP/IP Level 3 Service */
/* */
/* Last modification: 10/14/1997 Sweeney Change check for MPTS CSD WRx84xx */
/******************************************************************************/
parse source args
call rxfuncadd 'sysloadfuncs','rexxutil','sysloadfuncs'
call sysloadfuncs
Call RxFuncAdd 'SysLvlLoadFuncs' , 'SYSLVL' , 'SysLvlLoadFuncs'
Call SysLvlLoadFuncs , 'SYSLVL' , 'SysLvlLoadFuncs'
/* Get drive & path for \MPTN\, \TCPIP\, and \IBMCOM\ from the PATH environment
variable
*/
'@echo off'
PathVal = value('PATH',,'os2environment') /* get PATH variable */
/* Make sure the PATH has a terminating semicolon */
if substr(PathVal,length(PathVal),1)<>';' then PathVal = PathVal';'
MPTNPath=''
TCPath=''
IBMCPath=''
do forever
parse upper value PathVal with frontpart ';' backpart
if (substr(frontpart,3,5) = '\MPTN' &MPTNPATH="" ) then do
MPTNPath = substr(frontpart,1,7)
end
if ((substr(frontpart,3,6) = '\TCPIP') & TCPath="") then do
TCPath=substr(frontpart,1,8)
end
if (substr(frontpart,3,7) = '\IBMCOM' & IBMCPath="") then do
IBMCPath = substr(frontpart,1,9)
end
if backpart = '' then do
leave
end
PathVal = backpart
end
/* Verify that all the paths were found */
if MPTNPath='' | TCPath='' | IBMCPath='' then do
"wrongpth.exe"
exit 1
end
/* Verify the customer's MPTS level before updating the stack */
Call GetSysVersion MPTNPath'\syslevel.mpt'
ver = substr(result,1,3)
if ver <> "5.1" then /* 5.10, 5.11, ... */
do
"wrongver.exe"
exit 1
end
Call GetCSDLevel MPTNPath'\syslevel.mpt'
csd = substr(result,1,2) || 'x' || substr(result,4,2)
country = substr(result,3,1) /* 0 = USA, U = UK, ... */
if csd <> "WRx84" then /* WRx8400, WRx8410, WRx8415, ... */
do
"wrongcsd.exe"
exit 1
end
/* Verifications were successful. Update the stack files */
tcprep "afinet.sys "|| MPTNPath ||"\protocol"
tcprep "afos2.sys "|| MPTNPath ||"\protocol"
tcprep "ifndis.sys "|| MPTNPath ||"\protocol"
tcprep "sockets.sys "|| MPTNPath ||"\protocol"
tcprep "so32dll.dll "|| MPTNPath ||"\dll"
tcprep "tcp32dll.dll "|| MPTNPath ||"\dll"
if country = 0 then tcprep "tcpmri.dll "|| MPTNPath ||"\dll"
tcprep "tcptime.dll "|| MPTNPath ||"\dll"
tcprep "arp.exe "|| MPTNPath ||"\bin"
tcprep "cntrl.exe "|| MPTNPath ||"\bin"
tcprep "host.exe "|| MPTNPath ||"\bin"
tcprep "hostid.exe "|| MPTNPath ||"\bin"
tcprep "ifconfig.exe "|| MPTNPath ||"\bin"
tcprep "inetcfg.exe "|| MPTNPath ||"\bin"
tcprep "inetdbg.exe "|| MPTNPath ||"\bin"
tcprep "inetwait.exe "|| MPTNPath ||"\bin"
tcprep "ipformat.exe "|| MPTNPath ||"\bin"
tcprep "ipgate.exe "|| MPTNPath ||"\bin"
tcprep "iptrace.exe "|| MPTNPath ||"\bin"
tcprep "netstat.exe "|| MPTNPath ||"\bin"
tcprep "ping.exe "|| MPTNPath ||"\bin"
tcprep "route.exe "|| MPTNPath ||"\bin"
tcprep "syndef.exe "|| MPTNPath ||"\bin"
tcprep "routed.exe "|| TCPath ||"\bin"
tcprep "tcpip.nif "|| IBMCPath ||"\protocol"
tcprep "tcpipdll.dll "|| MPTNPath ||"\dll"
/* Prevent new tcpipdll.dll from being overwritten */
address cmd "erase" TCPath ||"\archive\dll\tcpipdll.dll"
Call ReleaseMemory
"mess.exe"
exit