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

作者:神秘网友 发布时间:2020-10-15 21:17:11

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

如何以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。

如何以Windows的不同方式从命令行启动应用程序?
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键盘快捷方式打开“运行命令框”。 如下所示输入应用程序。

如何以Windows的不同方式从命令行启动应用程序?
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

如何以Windows的不同方式从命令行启动应用程序?
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。

如何以Windows的不同方式从命令行启动应用程序?
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? 如何自动执行任务?
如何以Windows的不同方式从命令行启动应用程序?
Start From Powershell
从Powershell开始

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

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

如何以Windows的不同方式从命令行启动应用程序?
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
如何以Windows的不同方式从命令行启动应用程序?
Start From File Explorer Address Bar
从文件资源管理器地址栏开始

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

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

  1. 如何使用Dir在Windows命令行中导航,列出文件和目录?

    如何使用Dir在Windows命令行中导航,列出文件和目录? Windows operating system provides command line tool named MS-DOS. This command line have different tools and capabilities for daily operations. We will look some simple steps about usage li

  2. Windows中带有MS-DOS命令提示符的循环

    Windows中带有MS-DOS命令提示符的循环 Windows operating system provides MS-DOS from easily days of its creation. MS-DOS is a platform generally used as a command line.MD-DOS have a lot of features those provides programming capabilities. In t

  3. 如何在Windows中使用Schtasks从命令行计划任务?

    如何在Windows中使用Schtasks从命令行计划任务? Recurring tasks are generally schedules with scheduled task manager. Scheduled task manager have GUI for management but creating a task in 20 different servers is very hard and trivial job. Wind

  4. 如何在Windows中使用Xcopy复制文件和备份?

    如何在Windows中使用Xcopy复制文件和备份? Windows provides very featureful command which is used to copy files can take backups named xcopy . Xcopy can be used copy files from one partition to other partition or a usb drive. Xcopy also suppo

  5. mysql命令行导入导出_如何在Windows中通过命令行添加,删除,删

    mysql命令行导入导出_如何在Windows中通过命令行添加,删除,删除,导入,导出,管理注册表项?... mysql命令行导入导出 Registry is a database used by Windows operating systems to store information about applications, users, operating system, netw

  6. 使用Windows At Command计划作业和任务

    使用Windows At Command计划作业和任务 Linux have the same command for same reasons to schedule commands and jobs for specified times and periods. Windows have the same command with similar usage too. Alternative to this command is schtasks c

  7. 如何使用Netsh命令从命令行管理Windows防火墙?

    如何使用Netsh命令从命令行管理Windows防火墙? Windows firewall is a useful mechanism which is used to control network traffic and ports. There are different ways to manage Windows firewall like GUI, Powershell and MS-DOS. Today we will look

  8. wmic cpu_如何在Windows中使用Wmic命令获取CPU信息?

    wmic cpu_如何在Windows中使用Wmic命令获取CPU信息? wmic cpu Wmic is a set of tools used to get and set operating system related configuration and information. In this tutorial we will look how to get information about CPU. Wmic是用于获取和设