How use .bat file to autmatically open web link in edge


  1. Posts : 24
    win10 isider pro
       #1

    How use .bat file to autmatically open web link in edge


    I am using .bat file to launch few of my everyday programs in win 10...How can i add to my .bat file to launch web page in edge ?
    Web page is
    Listening to: KJFK Tower | New York, New York, United States | LiveATC.net
      My Computer


  2. Posts : 5,328
    Windows 11 Pro 64-bit
       #2

    You can add below command:


    Code:
    start microsoft-edge:"https://www.liveatc.net/flisten.php?icao=kjfk&mount=kjfk_twr"
      My Computer


  3. Posts : 4,142
    Windows 3.1 to Windows 11
       #3
      My Computer


  4. Posts : 1
    Windows 10
       #4

    Thanks for sharing this cmd, helped me. thanks brother.


    FreeBooter said:
    You can add below command:


    Code:
    start microsoft-edge:"https://www.liveatc.net/flisten.php?icao=kjfk&mount=kjfk_twr"

    Thanks for sharing this cmd, helped me. thanks brother.
      My Computer


  5. Posts : 5,328
    Windows 11 Pro 64-bit
       #5

    JesseTewboo said:
    Thanks for sharing this cmd, helped me. thanks brother.
    You are very welcome!
      My Computer


  6. Posts : 5,452
    Windows 11 Home
       #6

    Any idea how to open edge links within edge? Like:
    Code:
    edge://settings/content/backgroundSync
    When I use it, it says that "You need an app to open this edge link". Edge is set as a default browser.
      My Computer


  7. Posts : 3,274
    Win10
       #7

    TairikuOkami; Unless Edge has some hidden options to start Settings Pages from a command prompt, if we attempt to open it with any address which doesn't start with the http/s protocol, then it throws an error - one exception I seem to have noticed is, starting Edge with the about:blank page which does work.

    Anyway, using a powershell script converted to a batch/command using the SendKeys method, the following command seems to work whether Edge is open or needs to be opened to get to the Sync page (-at least it does for me) .

    Cmd Box command (or if using your own batch file, create a shortcut to the batch and change its property to run 'minimized' -important)
    Code:
    Powershell -command "$wshell = New-Object -ComObject wscript.shell;[system.Diagnostics.Process]::Start(\"msedge\",\"about:blank\");Sleep 1;$wshell.SendKeys('^"{l}"');Sleep 1;$wshell.SendKeys('edge://settings/content/backgroundSync');$wshell.SendKeys('"{Enter}"')"
    OR:
    an already minimized batch file
    Code:
    :: batch file to open edge with sync settings page opened
    :: run it minimized
    if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
    Powershell -command "$wshell = New-Object -ComObject wscript.shell;[system.Diagnostics.Process]::Start(\"msedge\",\"about:blank\");Sleep 1;$wshell.SendKeys('^"{l}"');Sleep 1;$wshell.SendKeys('edge://settings/content/backgroundSync');$wshell.SendKeys('"{Enter}"')"
    exit
    Last edited by das10; 06 Mar 2022 at 06:27.
      My Computers


 

  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 20:53.
Find Us




Windows 10 Forums