如何以Windows的不同方式从命令行启动应用程序?

Windows is very user friendly and GUI oriented operating system. Other operating systems like Unix, Linux, BSD came from non-GUI heritance and adopted the GUI experience in recent decade very good. In contrast Microsoft started to provide more productive command line support to use Windows operating systems features. One of the most used operation is starting applications. In this tutorial we will look how to start an GUI application from command line and relative ways. The started application can be also an command line application too.

Windows是非常用户友好和GUI导向的操作系统。 其他操作系统,例如Unix,Linux,BSD,都来自非GUI继承,并且在最近十年中采用GUI的经验非常好。 相反,Microsoft开始提供使用Windows操作系统功能的更高效的命令行支持。 最常用的操作之一是启动应用程序。 在本教程中,我们将研究如何从命令行和相对方式启动GUI应用程序。 启动的应用程序也可以是命令行应用程序。

从开始搜索框开始 (Start From Start Search Box)

The first way to start and app either GUI or non-GUI the start search box can be used. Normally this is used to search computer for file and directories but before starting to search files and directories it search for given term in commands and applications. We will start Windows Paint with the mspaint command like below.

可以使用第一个启动和应用GUI或非GUI的方法,即开始搜索框。 通常,它用于在计算机上搜索文件和目录,但是在开始搜索文件和目录之前,它先在命令和应用程序中搜索给定术语。 我们将使用以下mspaint命令启动Windows Paint。

Start From Start Search Box
Start From Start Search Box
从开始搜索框开始

从运行命令框开始(Start With Run Command Box)

Run command box is used to run commands directly in a shell in Windows operating systems. Run command box provides easy shortcut for running commands. Run Command Box can be opened with WIN+r keyboard shortcut. The application will be entered like below.

运行命令框用于直接在Windows操作系统的外壳程序中运行命令。 运行命令框提供了用于运行命令的简便快捷方式。 可以使用WIN+r键盘快捷方式打开“运行命令框”。 如下所示输入应用程序。

Start With Run Command Box
Start With Run Command Box
从运行命令框开始

从MS-DOS开始(Start From MS-DOS)

MS-DOS is actually a simple operating system for 30 years old. MS-DOS console can be accesses like below from the start menu. This is named Command Prompt .

MS-DOS实际上是一个已有30年历史的简单操作系统。 可以从开始菜单通过以下方式访问MS-DOS控制台。 这称为Command Prompt

Start From MS-DOS
Start From MS-DOS
从MS-DOS开始

After starting MS-DOS Command Prompt we will just input the mspaint command and hit enter.

启动MS-DOS命令提示符后,我们将只输入mspaint命令并按Enter。

Start From MS-DOS
Start From MS-DOS
从MS-DOS开始

从Powershell开始(Start From Powershell)

Powershell is new command prompt provided by Microsoft as an alternative to the MS-DOS. Applications with or without GUI can be start with Powershell too. Starting is similar to the MS-DOS command prompt. First we will start Powershell

Powershell是Microsoft提供的新命令提示符,可以替代MS-DOS。 带有或不带有GUI的应用程序也可以从Powershell启动。 启动类似于MS-DOS命令提示符。 首先,我们将启动Powershell

LEARN MORE  What is Microsoft Powershell ? How Can I Automate Tasks?
了解更多什么是Microsoft Powershell? 如何自动执行任务?
Start From Powershell
Start From Powershell
从Powershell开始

Then we will just run the command like mspaint like below.

然后,我们将像下面这样运行像mspaint这样的命令。

Start From Powershell
Start From Powershell
从Powershell开始

从批处理文件开始(Start From Batch File)

Batch files are used to run commands file a file. Batch file mechanism generally used to run Scheduled Jobs but there are different use cases too. We will write a batch file named paint.bat and put mspaint as containt into this file like below. The bat extension is important.

批处理文件用于运行命令文件一个文件。 批处理文件机制通常用于运行计划作业,但也有不同的用例。 我们将编写一个名为paint.bat的批处理文件,并将mspaint作为包含内容放入此文件中,如下所示。 bat延伸很重要。

paint.bat

paint.bat

mspaint

从文件资源管理器地址栏开始 (Start From File Explorer Address Bar)

File explorer is another useful tool to start an application. The location or address bar can be used to run an application. In this situation we should know and put the absolute path of the application to the location bar like below. In this example the full path of the mspaint is

File Explorer是另一个启动应用程序的有用工具。 位置或地址栏可用于运行应用程序。 在这种情况下,我们应该知道应用程序的绝对路径并将其放在如下所示的位置栏中。 在此示例中, mspaint的完整路径为

C:\Windows\System32\mspaint.exe
Start From File Explorer Address Bar
Start From File Explorer Address Bar
从文件资源管理器地址栏开始

翻译自: https://www.poftut.com/start-applications-command-line-windows-different-ways/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值