home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / k95 / ras / nt-ras-notes.txt next >
Text File  |  2020-01-01  |  4KB  |  124 lines

  1. These notes apply only to RAS on Windows NT, 2000, and XP.
  2.  
  3. Use the AT command to schedule Dial-Up Network connections (or
  4. any other schedulable events) for a specific time:
  5.  
  6. C:\Tmp> at /?
  7.  
  8. The AT command schedules commands and programs to run on a computer at
  9. a specified time and date. The Schedule service must be running to use
  10. the AT command.
  11.  
  12. AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
  13. AT [\\computername] time [/INTERACTIVE]
  14.     [ /EVERY:date[,...] | /NEXT:date[,...]] "command"
  15.  
  16. \\computername     Specifies a remote computer. Commands are scheduled
  17.                    on the local computer if this parameter is omitted.
  18.  
  19. id                 Is an identification number assigned to a scheduled
  20.                    command.
  21.  
  22. /delete            Cancels a scheduled command. If id is omitted, all
  23.                    the scheduled commands on the computer are canceled.
  24.  
  25. /yes               Used with cancel all jobs command when no further
  26.                    confirmation is desired.
  27.  
  28. time               Specifies the time when command is to run.
  29.  
  30. /interactive       Allows the job to interact with the desktop of the
  31.                    user who is logged on at the time the job runs.
  32.  
  33. /every:date[,...]  Runs the command on each specified day(s) of the
  34.                    week or month. If date is omitted, the current day of the
  35.                    month is assumed.
  36.  
  37. /next:date[,...]   Runs the specified command on the next occurrence
  38.                    of the day (for example, next Thursday).  If date is
  39.                    omitted, the current day of the month is assumed.
  40.  
  41. "command"          Is the Windows NT command, or batch program to be run.
  42.  
  43.  
  44. For making a Dial-Up Network Connection:
  45.  
  46. C:\Tmp> rasdial /?
  47.  
  48. USAGE:
  49.         rasdial entryname [username [password|*]] [/DOMAIN:domain]
  50.                 [/PHONE:phonenumber] [/CALLBACK:callbacknumber]
  51.                 [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]
  52.  
  53.         rasdial [entryname] /DISCONNECT
  54.  
  55.         rasdial
  56.  
  57. Command completed successfully.
  58.  
  59. -----
  60.  
  61. These commands are the basis for making automated Dial-Up Networking
  62. connections.  Unfortunately, there is no good way to ask "do I have a valid
  63. connection?" or "am I already connected to <entryname>?".
  64.  
  65. The tools we do have are:
  66.  
  67.  . ask K95 to SET HOST and check the for success or failure
  68.  
  69.  . RASDIAL <entryname> - if already connected, the port will be in use
  70.    and the command will fail with Error 633.  However, the port could
  71.    be in use for any reason and it will also fail with Error 633.
  72.    Note that RASDIAL might not be in your PATH, so you might have to
  73.    type its full pathname, e.g. in Windows XP "c:\i386\rasdial.exe".
  74.  
  75.    C:\Tmp> rasdial powerpc1
  76.    Connecting to POWERPC1...
  77.  
  78.    Remote Access error 633 - The port is already in use or is not
  79.    configured for Remote Access dial out.
  80.  
  81.    For more help on this error:
  82.         Type 'winhlp32 rasphone.hlp'
  83.         In help, choose Index page and type 'Error 633'
  84.  
  85.  . RASDIAL by itself.  Will report to the screen the current
  86.    connection status.
  87.  
  88.    C:\Tmp> rasdial
  89.    Connected to
  90.    PowerPC1
  91.    Command completed successfully.
  92.  
  93.    C:\Tmp> rasdial
  94.    No connections
  95.    Command completed successfully.
  96.  
  97.    However, it does not indicate it at all by the exit status.
  98.  
  99. ---
  100.  
  101. So the best we can do is the following:
  102.  
  103. SET HOST <host>
  104. IF FAILURE {
  105.     RUN RASDIAL <entryname>
  106.     XIF SUCCESS {
  107.     DEFINE RASCONNECT YES
  108.     SET HOST <host>
  109.     }
  110. }
  111.  
  112. ... conduct your session ...
  113.  
  114. CLOSE
  115. IF DEF RASCONNECT {
  116.     RUN RASDIAL <entryname> /DISCONNECT
  117.     UNDEFINE RASCONNECT
  118. }
  119.  
  120. Unfortunately, it is not possible for Kermit to automate the dialing
  121. process or the creation of the RAS phone book entries.
  122.  
  123. (End)
  124.