如何启动多个Internet Explorer窗口/标签从批处理文件? [英] How to launch multiple Internet Explorer windows/tabs from batch file?

查看:255
本文介绍了如何启动多个Internet Explorer窗口/标签从批处理文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一个批处理文件来启动两个单独的程序则必须在命令行窗口关闭。实际上,为了澄清,我推出的Internet Explorer有两个不同的URL。

I would like a batch file to launch two separate programs then have the command line window close. Actually, to clarify, I am launching Internet Explorer with two different URLs.

到目前为止,我有这样的事情:

So far I have something like this:

start "~\iexplore.exe" "url1"
start "~\iexplore.exe" "url2"

我得到的是只装载的第二个URL的Internet Explorer的一个实例。看来二是取代第二。我似乎记得语法在那里我会加载一个新的命令行窗口,然后传递到负载执行命令,却找不到参考。

What I get is one instance of Internet Explorer with only the second URL loaded. Seems the second is replacing the second. I seem to remember a syntax where I would load a new command line window and pass the command to execute on load, but can't find the reference.

至于问题的第二部分:什么是一个很好的参考网址让你需要编写一个快速批处理文件的时间

As a second part of the question: what is a good reference URL to keep for the times you need to write a quick batch file?

编辑:我标记了答案,因为它的工作。我现在有两个窗口打开,每个网址。 (感谢!)有趣的是,如果没有使用我原来的语法/ D的方法,我得根据我是否有pre-现有的Internet Explorer实例中打开不同的结果。

I have marked an answer, because it does work. I now have two windows open, one for each URL. (thanks!) The funny thing is that without the /d approach using my original syntax I get different results based on whether I have a pre-existing Internet Explorer instance open.


  • 如果我这样做,我得到了两个新的选项卡添加了对
    我的两个网址(甜!)

  • 如果不是我得到的只有一个我传递的第二个URL最后一个选项卡。

推荐答案

在您的批处理文件试试这个:

Try this in your batch file:

@echo off
start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.google.com
start /d "C:\Program Files\Internet Explorer" IEXPLORE.EXE www.yahoo.com

这篇关于如何启动多个Internet Explorer窗口/标签从批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆