Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Script / Prog, that will auto-connect to dsl on startup?

  • 14-10-2004 3:37pm
    #1
    Closed Accounts Posts: 1,637 ✭✭✭


    Hy,

    I need to have two computers that connect to IOLBB once they are switched on, does anyone have a script or prog that would do that?

    Thanks JoePC


Comments

  • Registered Users, Registered Users 2 Posts: 2,098 ✭✭✭aaf


    I think you'd better clarify what you mean. DSL is an always-on service so if your 2 PC's are connected to the broadband service through a router, switch, hub, whatever, then as soon as the PC boots the OS, you should be online without having to do anything. I would've thought you'd know that Joe


  • Closed Accounts Posts: 1,637 ✭✭✭joePC


    Yes I do, BUT what I mean is the two PC's are using ICS, so one PC is connecting through the USB dsl modem. Now when I start the PC, I have to login to my IOL account manually, I want this to be automated.
    e.g. Connects to IOLBB automatically without me having to do anything.

    Thanks JoePC


  • Registered Users, Registered Users 2 Posts: 3,147 ✭✭✭oneweb


    I think I posted a solution to this. It was a batch file which ran on system startup. I'll try dig it up for ya...

    It is what it's.



  • Registered Users, Registered Users 2 Posts: 2,098 ✭✭✭aaf


    Thanks for clarifying that. Sorry man, can't help although it sounds as if there's an easy workaround.


  • Registered Users, Registered Users 2 Posts: 6,321 ✭✭✭OfflerCrocGod


    Copy the text from the internet connection shortcut "target" variable into a bat file and drag a shortcut to this file into Start-->Programs-->Startup. Should do the trick.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,147 ✭✭✭oneweb


    Copy the text from the internet connection shortcut "target" variable into a bat file and drag a shortcut to this file into Start-->Programs-->Startup. Should do the trick.
    IIRC, the target is non-physical (I think it's a namespace or something rather than path)

    rasdial is what you want, the exact syntax I'm unsure of and can't find the script I used to have.

    It is what it's.



  • Closed Accounts Posts: 1,637 ✭✭✭joePC


    OK I got the following script, Please fix to autodial if you can.
    ;
    ; This is a script file that demonstrates how
    ; to establish a PPP connection with a host
    ; that uses a menu system.
    ;
    ; A script file must have a 'main' procedure.
    ; All script execution starts with this 'main'
    ; procedure.
    ;
    
    
    ; Main entry point to script
    ;
    proc main
    
       ; Change these variables to customize for your
       ; specific Internet service provider
    
       integer nTries = 3
    
       ; This is the login prompt and timeout values
    
       string szLogin = "username:"
       integer nLoginTimeout = 3
    
       ; This is the password prompt and timeout values
    
       string szPW = "password:"
       integer nPWTimeout = 3
    
       ; This is the prompt once your password is verified
    
       string szPrompt = "annex:"
    
       ; This is the command to send to establish the 
       ; connection.  This script assumes you only need
       ; to issue one command to continue.  Feel free
       ; to add more commands if your provider requires
       ; it.
    
       ;
       ; This provider has a menu list like this:
       ;
       ;   1              : Our special GUI
       ;   2              : Establish slip connection
       ;   3              : Establish PPP connection
       ;   4              : Establish shell access
       ;   5              : Download our software
       ;   6              : Exit
       ;
       ;   annex:
       ;
    
       string szConnect = "3^M"
    
       ; Set this to FALSE if you don't want to get an IP
       ; address
    
       boolean bUseSlip = FALSE
    
       
       ; -----------------------------------------------------
    
    
       ; Delay for 2 seconds first to make sure the
       ; host doesn't get confused when we send the
       ; two carriage-returns.
    
       delay 2
       transmit "^M^M"
    
       ; Attempt to login at most 'nTries' times
    
       while 0 < nTries do
    
          ; Wait for the login prompt before entering
          ; the user ID, timeout after x seconds
    
          waitfor szLogin then DoLogin 
            until nLoginTimeout
    
    TryAgain:
          transmit "^M"        ; ping
          nTries = nTries - 1
    
       endwhile
    
       goto BailOut
    
    DoLogin:
       ; Enter user ID
    
       transmit $USERID, raw
       transmit "^M"
    
       ; Wait for the password prompt 
    
       waitfor szPW until nPWTimeout
       if FALSE == $SUCCESS then
          goto TryAgain
       endif
    
       ; Send the password
    
       transmit $PASSWORD, raw
       transmit "^M"
    
       ; Wait for the prompt
    
       waitfor szPrompt
    
       transmit szConnect
    
       if bUseSlip then
          ; An alternative to the following line is
          ;
          ;     waitfor "Your address is "
          ;     set ipaddr getip
          ;
          ; if we don't know the order of the IP addresses.
    
          set ipaddr getip 2
       endif
       goto Done
    
    BailOut:
       ; Something isn't responding.  Halt the script
       ; and let the user handle it manually.
    
       set screen keyboard on
       halt
    
    Done:
    
    endproc
    
    
    

    Thanks JoePC


Advertisement