locked
How to code this batch file? RRS feed

  • Question

  • I would like to delay 10 sec before opening IE, so ensure internet established, and loading the web without any problem.

    Does anyone have any suggestions?

    Thanks in advance for any suggestions :>

    1) Script to make connection to Internet

    2) Delay 10 sec

    @echo off

    start /b /max "IE" "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.abc.com


    Thanks in advance for any suggestions



    • Edited by oemMicrosoft Wednesday, January 22, 2014 11:29 PM
    Wednesday, January 22, 2014 11:29 PM

Answers

  • Powershell -command "&{sleep -s 10}"

    ¯\_(ツ)_/¯


    • Edited by jrv Wednesday, January 22, 2014 11:55 PM
    • Marked as answer by oemMicrosoft Wednesday, January 22, 2014 11:59 PM
    Wednesday, January 22, 2014 11:53 PM
  • I would like to delay 10 sec before opening IE, so ensure internet established, and loading the web without any problem.

    This will delay the start of IE, as per your request:

    @echo off
    ping localhost -n 11 > nul
    start /b /max "IE" "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.abc.com
    • Marked as answer by oemMicrosoft Wednesday, January 22, 2014 11:41 PM
    Wednesday, January 22, 2014 11:38 PM

All replies

  • Hi,

    You can put in an approximately 10 second delay by using ping 127.0.0.1 -n 10 >nul


    Don't retire TechNet! - (Don't give up yet - 12,575+ strong and growing)

    Wednesday, January 22, 2014 11:37 PM
  • I would like to delay 10 sec before opening IE, so ensure internet established, and loading the web without any problem.

    This will delay the start of IE, as per your request:

    @echo off
    ping localhost -n 11 > nul
    start /b /max "IE" "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.abc.com
    • Marked as answer by oemMicrosoft Wednesday, January 22, 2014 11:41 PM
    Wednesday, January 22, 2014 11:38 PM
  • you can try this

    @echo off
    timeout /NOBREAK 10
    start /b /max "IE" "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.abc.com


    ----Please vote if this is helpful----- -----Knowledge is Power-------- Ajo Abraham [MCP] [MCTS]

    Wednesday, January 22, 2014 11:41 PM
  • Thanks, to everyone very much for suggestions :>

    Thanks in advance for any suggestions

    Wednesday, January 22, 2014 11:41 PM
  • Powershell -command "&{sleep -s 10}"

    ¯\_(ツ)_/¯


    • Edited by jrv Wednesday, January 22, 2014 11:55 PM
    • Marked as answer by oemMicrosoft Wednesday, January 22, 2014 11:59 PM
    Wednesday, January 22, 2014 11:53 PM
  • you can try this

    @echo off
    timeout /NOBREAK 10

    Nice. I was not aware of timeout.exe.
    Wednesday, January 22, 2014 11:54 PM
  • Thanks, to everyone very much for suggestions :>

    Thanks in advance for any suggestions

    Thursday, January 23, 2014 12:02 AM
  • Powershell would be the best option

    Start-Sleep -s 10

    for more help

    http://technet.microsoft.com/en-us/library/ee177002.aspx


    ----Please vote if this is helpful----- -----Knowledge is Power-------- Ajo Abraham [MCP] [MCTS]

    • Proposed as answer by Dex_ghost Thursday, January 30, 2014 11:39 AM
    Thursday, January 23, 2014 12:03 AM