当前位置:网站首页>使用bat命令一键启动常用浏览器
使用bat命令一键启动常用浏览器
2022-07-05 10:21:00 【夜雨听萧瑟】
我们常常需要打开特定的网址,比如翻译网页,或者其他网页,需要多次跳转后才可以跳转到目标网页。写成bat命令后,就可以一键启动。
可以再.bat文件中写入命令,然后双击运行,下面举了2个简单例子。
1、启动百度
@echo off
cd C:\Program Files (x86)\Microsoft\Edge\Application
start msedge.exe https://www.baidu.com/
2、启动菜鸟解析json网页
@echo off
#浏览器exe的地址
cd C:\Program Files (x86)\Microsoft\Edge\Application
start msedge.exe https://c.runoob.com/front-end/53/
附加知识:
bat的语法如下:
Start
启动单独的“命令提示符”窗口来运行指定程序或命令。如果在没有参数的情况下使用,start 将打开第二个命令提示符窗口。
语法
start ["title"] [/dPath] [/i] [/min] [/max] [{/separate | /shared}] [{/low | /normal | /high | /realtime | /abovenormal | belownormal}] [/wait] [/b] [FileName] [parameters]
参数
"title" 指定在“命令提示符”窗口标题栏中显示的标题。
/dpatch 指定启动目录。
/i 将 Cmd.exe 启动环境传送到新的“命令提示符”窗口。
/min 启动新的最小化窗口。
/max 启动新的最大化窗口。
/separate 在单独的内存空间启动 16 位程序。
/shared 在共享的内存空间启动 16 位程序。
/low 以空闲优先级启动应用程序。
/normal 以一般优先级启动应用程序。
/high 以高优先级启动应用程序。
/realtime 以实时优先级启动应用程序。
/abovenormal 以超出常规优先级的方式启动应用程序。
/belownormal 以低出常规优先级的方式启动应用程序。
/wait 启动应用程序,并等待其结束。
/b 启动应用程序时不必打开新的“命令提示符”窗口。除非应用程序启用 CTRL+C,否则将忽略 CTRL+C 操作。使用 CTRL+BREAK 中断应用程序。
非执行文件只要将文件名作为命令键入,即可通过其文件关联运行该文件。有关使用 assoc 和 ftype 在命令脚本中创建这些关联的详细信息,请参阅“”。
在运行的命令的第一个标记为“CMD”字符串但不包括扩展名或路径限定符时,“CMD”将被 COMSPEC 变量的值取代。这样可以防止用户从当前目录选取 cmd。
当您运行 32 位图形用户界面 (GUI) 应用程序时,cmd 不会在返回到命令提示符之前等待应用程序退出。如果从命令脚本运行应用程序,则不会发生这种新情况。在运行的命令中第一个符号不包括扩展名的情况下,Cmd.exe 使用 PATHEXT 环境变量的值确定要查找的扩展名以及查找顺序。PATHEXT 变量的默认值为:COM;.EXE;.BAT;.CMD(语法与 PATH 变量相同,使用分号分开不同元素)。当您搜索可执行文件且在任何扩展名上都没有匹配项时,start 将搜索目录名。
bat的start命令简单介绍如下;
边栏推荐
- 脚手架开发进阶
- GO项目实战 — Gorm格式化时间字段
- Pseudo class elements -- before and after
- pytorch输出tensor张量时有省略号的解决方案(将tensor完整输出)
- 想请教一下,十大券商有哪些?在线开户是安全么?
- 重磅:国产IDE发布,由阿里研发,完全开源!
- Learning note 4 -- Key Technologies of high-precision map (Part 2)
- [可能没有默认的字体]Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename……
- Node の MongoDB Driver
- 到底谁才是“良心”国产品牌?
猜你喜欢
Window下线程与线程同步总结
AtCoder Beginner Contest 258「ABCDEFG」
Blockbuster: the domestic IDE is released, developed by Alibaba, and is completely open source!
Events and bubbles in the applet of "wechat applet - Basics"
[observation] with the rise of the "independent station" model of cross-border e-commerce, how to seize the next dividend explosion era?
How to plan the career of a programmer?
[vite] 1371 - develop vite plug-ins by hand
Pseudo class elements -- before and after
Universal double button or single button pop-up
5G NR系统架构
随机推荐
TypeError: Cannot read properties of undefined (reading ‘cancelToken‘)
Window下线程与线程同步总结
How to judge that the thread pool has completed all tasks?
分享.NET 轻量级的ORM
Workmanager learning 1
Go项目实战—参数绑定,类型转换
学习笔记5--高精地图解决方案
《天天数学》连载58:二月二十七日
小程序中自定义行内左滑按钮,类似于qq和wx消息界面那种
Nine degrees 1480: maximum ascending subsequence sum (dynamic programming idea for the maximum value)
How can non-technical departments participate in Devops?
函数///
@Jsonadapter annotation usage
【JS】提取字符串中的分数,汇总后算出平均分,并与每个分数比较,输出
Apple 5g chip research and development failure? It's too early to get rid of Qualcomm
vscode的快捷键
双向RNN与堆叠的双向RNN
流程控制、
Completion report of communication software development and Application
In wechat applet, after jumping from one page to another, I found that the page scrolled synchronously after returning