home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pcnt4v11.zip / TCPCHK.CMD < prev    next >
OS/2 REXX Batch file  |  1998-11-28  |  941b  |  35 lines

  1. /* Do checks common to both pinstall and pppcnt */
  2.  
  3.     Parse Arg acct .
  4.  
  5.  
  6. /* Look for TCPOS2.INI file */
  7.  
  8.             inif=SysSearchPath("ETC","tcpos2.ini")
  9.             If(inif="") Then
  10.                Do
  11.                 Say "TCPOS2.INI file not found, perhaps TCPIP is not installed."
  12.                 Return ""
  13.                End
  14.  
  15. /* This account found in TCPOS2.INI? */
  16.  
  17.             ty=SysIni(inif, acct, 'SERVICE')         /* test INI for account  */
  18.             If(ty='ERROR:') Then
  19.                Do
  20.                 Say "Create" acct "in Dial Other Providers, Account not found."
  21.                 Return ""
  22.                End
  23.             ty=Delstr(ty, Length(ty))
  24.  
  25. /* Service set for SLIP or PPP? */
  26.  
  27.             If(ty<>'PPP') Then
  28.                Do
  29.                 Say "Check" acct "in Dial Other Providers, Not a PPP account!"
  30.                 Return ""
  31.                End
  32.  
  33.                Return inif
  34.  
  35.