本文介绍了打开和等待,直到IE在批处理文件关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个批处理文件,打开IE浏览器,并等待,直到它才去到批处理文件的下一行关闭。如何做到这一点?
BTW IEXPLORE命令似乎在Windows 7中的命令行中不工作。任何想法,为什么?

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 working in Windows 7 command line. Any idea why?

谢谢...

推荐答案

浏览器是复杂的,当涉及到处理的一生中,甚至早在标签前的日子里,IE浏览器可能在单个进程中打开多个窗口。他们还经常使用DDE打开网址,使它很难跟踪正确的过程。如果要强制用户使用IE浏览器(为什么不使用默认的浏览器?),你可以使用Windows脚本宿主自动化IE(自动化也存在一些问题,当涉及到保护IE IIRC)

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

这篇关于打开和等待,直到IE在批处理文件关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 20:46