Jump to content

Howto create PPPoE Dialer Installer Package for Users in AutoIT ???


aacable
 Share

Recommended Posts

I have pppoe server, and I want to provide clients a dialer installer package, which they simply install, its shortcut should appear on desktop,they just have to only enter USER ID + PASSWORD to connect. (like we can create dialer package for vpn user using windows2003 CMAK utility)

Can any1 help please ???

Link to comment
Share on other sites

I have pppoe server, and I want to provide clients a dialer installer package, which they simply install, its shortcut should appear on desktop,they just have to only enter USER ID + PASSWORD to connect. (like we can create dialer package for vpn user using windows2003 CMAK utility)

Can any1 help please ???

After googling a lot , specially in this forum, I am now able to create pppoe dialer package. Now my question is,

How can I add custom logo and support phone number in this dialer ?? (Like we can do in Windows 2003 VPN CMAK utility)

I am using the following script.

#NoTrayIcon
#compiler_icon=itlifesaver.ico
#include <GUIConstants.au3>
$COMPANY_NAME = "AACABLE - DIALER SERVICE" ; name of the pppoe icon, friendly description
$SERVICE_NAME = "aa" ; name of the pppoe service configured in NAS/Mikrotik
$DELAY = 100
$answer = MsgBox(4, "PPPOE Connection", "This script will create a PPPOE DIALER connection to " & $COMPANY_NAME & ", Ready?")
If $answer = 7 Then
    Exit
EndIf
; Prompt user for PPPOE login info (zaib)
$frmInformation = GUICreate("Enter Information", 287, 194, 193, 115)
$lblUserName = GUICtrlCreateLabel("User Name:", 16, 40, 60, 17)
$lblPassword = GUICtrlCreateLabel("Password:", 16, 80, 53, 17)
$txtUserName = GUICtrlCreateInput("", 112, 40, 153, 21)
Dim $ES_PASSWORD,$ES_AUTOHSCROLL
$txtPassword = GUICtrlCreateInput("", 112, 80, 153, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$lblPassword2 = GUICtrlCreateLabel("Confirm Password:", 16, 120, 91, 17)
$txtPassword2 = GUICtrlCreateInput("", 112, 120, 153, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$btnOK = GUICtrlCreateButton("&OK", 200, 160, 75, 25, 0)
$lblInfo = GUICtrlCreateLabel("Enter your pppoe Login Information Below!", 48, 8, 196, 17)
GUISetState(@SW_SHOW)
 
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $btnOK
        If GUICtrlRead($txtPassword) <> GUICtrlRead($txtPassword2) Then
            MsgBox (16, "Error", "Passwords do not match! Try again.")
        Else
            $Username = GUICtrlRead($txtUsername)
            $Password = GUICtrlRead($txtPassword)
            ExitLoop
        EndIf
    Case $GUI_EVENT_CLOSE
        Exit
 
    EndSwitch
WEnd
GUISetState(@SW_HIDE)

; Run Network Setup
Run("control ncpa.cpl")
WinWaitActive("Network Connections")
; Check if PPPOE dialer by same name already exists, since it'll break script later if Windows add's a number at the end of the name...
$ControlID = ControlListView("Network Connections", "", "SysListView321", "FindItem", $COMPANY_NAME, "AACABLE - DIALER SERVICE")
If $ControlID <> -1 Then
    $answer = MsgBox(4404, "Error", "Connection to " & $COMPANY_NAME & " already exists! Remove it and recreate it?")
    If $answer = 6 Then
        ControlListView("Network Connections", "", "SysListView321", "Select", $ControlID)
        Send("{DEL}")
        WinWaitActive("Confirm Connection Delete")
        Send("!y")
        Sleep($DELAY)
    Else
        MsgBox(16, "Exit", "Script stopped by user")
        Exit
    EndIf
EndIf
; open new connection wizard from file menu
Send("!f")
Send("n")
; New Connection Wizard
Send("!n")
Sleep($DELAY)

; Choose Conncetion type
Send("!n")
Sleep($DELAY)
; setup connectoin manuall
Send("!m")
Sleep($DELAY)
Send("!n")
Sleep($DELAY)
; Connect using broadband connection with user name n passwd
Send("!u")
Sleep($DELAY)
Send("!n")
Sleep($DELAY)
; Send Your ISP Name
Send($COMPANY_NAME)
Send("!n")
Sleep($DELAY)
;Donot send id password here, we will set it in End
Send("!n")
Sleep($DELAY)

; Wizard Complete, do we want a desktop shortcut?
Send("!s")
Sleep($DELAY)
Send("{ENTER}")
WinWaitClose("New Connection Wizard")
WinWaitActive("Connect " & $COMPANY_NAME)
Send($Username)
Send("{TAB}")
Send($Password)
Sleep($DELAY)
Send("!s") ; save password...
Send("!a") ; for anyone who uses this computer, use "!n" for 'Me only'
Sleep($DELAY)
WinClose("Network Connections")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...