打开浏览器通过命令行 [英] Opening Chrome From Command Line

查看:471
本文介绍了打开浏览器通过命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下批处理文件:

@echo off
REM Starts a chrome browser with multiple tabbed sites
C:\Users\UserName\AppData\Local\Google\Chrome\Application\chrome.exe "site1.com" "site2.com"

但是,当我运行它,它会导致迅速挂起,并会导致其无法到Chrome浏览器关闭。 (或者,如果我不使用的提示,从图标运行它,它会打开一个空白的提示,是不可用的,当Chrome关闭消失。)

But when I run it, it causes the prompt to hang and renders it unusable until Chrome is closed. (Or, if I am not using the prompt and run it from the icon, it opens a blank prompt that is unusable and disappears when Chrome is closed.)

有什么办法prevent呢? I.E.一旦网页被打开,提示将不再捆绑起来。

Is there any way to prevent this? I.E. once the webpages are open, the prompt is no longer tied up.

它打开的网页就好了。我也注意到,如果有已经打开Chrome窗口,批处理运行良好(留下一个可用的提示),添加标签到现有的镀铬会话。

It opens the webpages just fine. I've also noticed that if there's already a chrome window open, the batch runs fine (leaving a usable prompt), adding the tabs to the existing chrome session.

推荐答案

看一看到启动命令。它应该做你想要达到的目标。

Have a look into the start command. It should do what you're trying to achieve.

此外,您可能能够路径离开了Chrome浏览器。在Windows 7上了以下工作:

Also, you might be able to leave out path to chrome. The following works on Windows 7:

启动铬site1.comsite2.com

这篇关于打开浏览器通过命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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