home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / pcnt3v11.zip / tcpchk.cmd < prev    next >
OS/2 REXX Batch file  |  1998-06-07  |  944b  |  36 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("PATH","tcpos2.ini")
  9.  
  10.             If(inif="") Then
  11.                Do
  12.                 Say "TCPOS2.INI file not found, perhaps TCPIP is not installed."
  13.                 Return ""
  14.                End
  15.  
  16. /* This account found in TCPOS2.INI? */
  17.  
  18.             ty=SysIni(inif, acct, 'SERVICE')         /* test INI for account  */
  19.             If(ty='ERROR:') Then
  20.                Do
  21.                 Say "Create" acct "in Dial Other Providers, Account not found."
  22.                 Return ""
  23.                End
  24.             ty=Delstr(ty, Length(ty))
  25.  
  26. /* Service set for SLIP or PPP? */
  27.  
  28.             If(ty<>'PPP') Then
  29.                Do
  30.                 Say "Check" acct "in Dial Other Providers, Not a PPP account!"
  31.                 Return ""
  32.                End
  33.  
  34.                Return inif
  35.  
  36.