Automatically start a PPPoE connection via a script and Task Scheduler  

    Automatically start a PPPoE connection via a script and Task Scheduler

    Automatically start a PPPoE connection via a script and Task Scheduler

    ... on Windows startup, after Windows wakes up, when any user logs on, and when the network cable is plugged in.
    Published by Category: Network & Sharing
    18 Aug 2020
    Designer Media Ltd



    Reference: What is PPPoE (Point-to-Point Protocol over Ethernet)? - Definition from WhatIs.com

    On Windows, setting up a PPPoE connection is simple. However, after setting it up, one has to manually start the connection via "Network & Internet" each time after Windows startup or waking up. This tutorial is about how to start it automatically on Windows startup, after Windows wakes up (from sleep or hibernation), when any user logs on, and when the network cable is plugged in. The method is to create a scheduled task of running a VBScript (.vbs) file that will start the connection.

    You only have to take a few simple steps, which are described below:


    1 Press the Windows key + R key. Run the following command to open "Network Connections".

    ncpa.cpl

    Automatically start a PPPoE connection via a script and Task Scheduler-network-connections.jpg

    2 Make a note of the connection name. The default name is Broadband Connection as shown above.

    3 Download the ZIP file below, and extract the files.
    4 Right-click on this file "Auto-connect.vbs" "Edit". Unblock the .vbs file. Find the following line (= the second line):

    ("Rasdial ""Connection name"" ""User name"" ""Password""",0,True)

    5 Replace the Connection name, User name, and Password with the correct ones. For example,

    ("Rasdial ""Broadband Connection"" ""Matthew Wai"" ""12345678""",0,True)

    The actual user name and password are provided by your Internet Service Provider (ISP).

    Be careful not to delete any of the quotation marks. In the top left-hand corner, click on "File" "Save". The .vbs file will start the connection automatically in the background (without a command window). Four attempts will be made because it could take a while for the connection to become available.

    6 Double-click on "Create_a_scheduled_task.cmd" to run it. Unblock the .cmd file, and click on "Yes" if prompted by UAC. The file will automatically create a scheduled task of running the said .vbs file.

    Automatically start a PPPoE connection via a script and Task Scheduler-success.jpg

    Then, your PPPoE connection will be started automatically. The task will be triggered by the following conditions:

    Automatically start a PPPoE connection via a script and Task Scheduler-triggers.jpg

    At log on of any user ---------------------------> That also applies to Windows startup.
    Power-Troubleshooter, Event ID: 1
    -------> Windows has woken from sleep or hibernation.
    NetworkProfile, Event ID: 4001 -------------> The network cable is plugged in.

    You may edit/delete them or add a new one if need be.

    The VBScript (.vbs) file will be copied into this folder %ProgramData%\TenForums.com\PPPoE\
    If you want to delete the scheduled task and the above folder, double-click on "Undo everything.cmd", which is also in the ZIP file you have downloaded.

    Automatically start a PPPoE connection via a script and Task Scheduler-deleted.jpg


  1. Posts : 61,909
    64-bit Windows 11 Pro for Workstations
       #1

    Great job Matthew.
      My Computers


  2. Posts : 16,159
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #2

    Excellent work @Matthew.
      My Computer


  3. Posts : 7,484
    Windows 10 Home 20H2
    Thread Starter
       #3

    Thanks to both of you!
      My Computer


  4. Posts : 17,641
    Windows 10 Pro
       #4

    Nice tut Matthew. Well done.

    Kari
      My Computer


 

Tutorial Categories

Automatically start a PPPoE connection via a script and Task Scheduler Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:07.
Find Us




Windows 10 Forums