Open and Wait untill IE is closed in batch file

前端 未结 4 550
猫巷女王i
猫巷女王i 2020-12-04 00:57

I want to open IE from a batch file and wait untill it is closed before going to the next line of the batch file. How to do this? BTW iexplore command seems to be not workin

4条回答
  •  天命终不由人
    2020-12-04 01:41

    Browsers are complicated when it comes to process lifetime, even back in the days before tabs, IE could have more than one window open in a single process. They also often use DDE to open urls making it hard to track the "correct" process. If you want to force the user to use IE (Why not use the default browser?) you could use windows scripting host to automate IE (Automation has some problems when it comes to protected IE IIRC)

    I would recommend just a simple pause:

    start /wait http://example.com
    echo. When you are done reading xyz, press [Enter] to continue...
    pause >nul
    

提交回复
热议问题