Windows 8 and 8.1 Forums


How to RUN A PROGRAM ONLY AFTER INTERNET IS CONNECTED?

  1. #1


    Chennai, India
    Posts : 23
    Windows 8 Pro

    How to RUN A PROGRAM ONLY AFTER INTERNET IS CONNECTED?


    I want my computer to automatically run a program (bat file) at startup only after my Internet connection is completely connected.
    How do I do it?

      My System SpecsSystem Spec

  2. #2


    Posts : 1,875
    Windows 10 Pro Prieview x64


    Use Task Scheduler, create a new task (that runs on log on of any user for example) and make the condition to start being on connection to the network you want.
    Attached Thumbnails Attached Thumbnails Capture.PNG  
      My System SpecsSystem Spec

  3. #3


    Chennai, India
    Posts : 23
    Windows 8 Pro


    Quote Originally Posted by adamf View Post
    Use Task Scheduler, create a new task (that runs on log on of any user for example) and make the condition to start being on connection to the network you want.
    I've tried that, but that doesn't work for me.
    It automatically runs the program when there is presence of network connection, not when it's completed connected.
      My System SpecsSystem Spec

  4. #4


    Posts : 1,875
    Windows 10 Pro Prieview x64


    You could write a script to wait until you can ping google like the one below. You'll need change it to call your program and then save it as for example WaitScript.ps1

    Then change your task scheduler entry to call this script. In task scheduler make it:

    Program: powershell
    Arguments: -executionpolicy bypass -file "C:\YourPath\WaitScript.ps1"

    Code:
    ## Wait for Google
    do {
      Write-Host "Waiting for Google..." -ForegroundColor "yellow"
    } until (Test-Connection -ComputerName www.google.com -Quiet)
     
    ## Call your program
    C:\windows\notepad.exe
    
      My System SpecsSystem Spec

  5. #5


    Chennai, India
    Posts : 23
    Windows 8 Pro


    Thank you Adam, that worked

    Thanks everyone for your help
      My System SpecsSystem Spec

  6. #6


    Posts : 1,875
    Windows 10 Pro Prieview x64


    Good news
      My System SpecsSystem Spec

How to RUN A PROGRAM ONLY AFTER INTERNET IS CONNECTED?
Related Threads
When I go on the app store I receive a massage saying my internet is not connected when in fact I am connected to the net and can go on line with a browser. Similarly all the apps show "offline" status. Funny thing is that when on the startpage I can see that the financial ticker is uptodate, but...
I installed it from the app store, with the metro interface. I'm really happy with how well it's working, but when I'm not connected to the internet, it boots up for a second and then crashes. Anyone know of any fixes for this?
Hello My mothers pc has a problem that occured about 5 days ago after a factory reset of our router, done by our ISP. It says that it is connected to the internet with both wireless and LAN, but it cannot load any web pages. I've tried using the CMD to ping the websites and there are no problems...
Hello, I have a Asus Laptop operating with Windows 8.1. It connects to wifi but none of the desktop icons can get to the Internet. Meanwhile most window tiles in the start menu have Internet access . For example I have the application "MegaTube" and that application has access to the Internet. As...
Hello, Logitech Gaming Software (latest, 8.51.5) is in my auto start list and everytime I boot it makes a device connected sound. I have the same on my Windows 7 x64 computer and it doesn't do that so Windows 8.1 x64 must be the culprit. I have looked in the Logitech help forums but they...
KERNEL_TRAP when connected to the internet in BSOD Crashes and Debugging
Greetings! I recently (as in last night) updated to 8.1, but ever since then once I connect to my DSL connection, after a random amount of time, within 15 min, I get a BSOD. I was hoping someone could analyze the .dmp for me to see what program or driver is causing this, so I can fix it. ...
So as the title suggests and as proved by me typing this I am connected to the internet but not to any networks lol when I hover over the connection in the task bar it says identifying internet access. When I open network and sharing centre it says I am not connected to any networks and when I...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook