您(Did)是否知道 Windows 10 允许您通过向快捷方式添加命令行参数来更改快捷方式?或者您还可以使用参数创建新的快捷方式,以便他们在打开或关闭某些功能的情况下自动打开目标应用程序?如果您想了解如何使用快捷方式向 Windows 10 应用程序添加启动选项,请继续阅读:
什么是快捷参数(shortcut parameter),也称为快捷参数(shortcut argument)?
在我们向您展示如何使用参数创建快捷方式以及如何将参数添加到已经可用的快捷方式之前,您应该首先知道它们是什么。快捷方式(Shortcut)参数是特殊命令,可以在您使用快捷方式启动应用程序时改变它们的运行方式。因此,带有启动参数的快捷方式可以启用或禁用它打开的应用程序的某些功能。
例如,通过向浏览器的快捷方式添加特殊参数,您可以使其自动以隐身模式(Incognito mode)启动。同样(Similarly),某些游戏允许您使用快捷方式参数来自动启用作弊、配置其图形设置等。
如何在Windows 10中将启动参数添加到快捷方式(Windows 10)
首先,找到要添加启动参数的快捷方式,或创建指向要使用命令行参数打开的程序的可执行文件的快捷方式。如果您不知道如何创建快捷方式,可以在此处找到所有信息:在Windows 10中为应用程序、文件、文件夹和网页创建(Create)快捷方式。
然后,右键单击或触摸并按住快捷方式,然后在其上下文菜单中选择“属性(Properties)”以打开快捷方式的“属性(Properties)”窗口。或者,您也可以选择快捷方式并同时按键盘上的Alt + Enter键。
快捷方式的“属性(Properties)”窗口是您可以为该快捷方式添加命令行参数的地方。选择快捷方式(Shortcut)选项卡并查找目标(Target)字段。
Target告诉快捷方式它应该启动什么应用程序。在下面的示例中,您可以看到我们选择创建并使用指向Firefox的快捷方式。
要将启动参数添加到快捷方式,请在目标(Target)文本字段内单击或点击,然后在行尾(at the end of the line)键入(type all the arguments)要添加到其中的所有参数。每个附加启动参数前面必须有一个空格和一个连字符(a blank space and a hyphen)。
在我们的例子中,因为我们想创建一个以私有模式打开Firefox的快捷方式,所以我们必须添加“-private-window”命令行参数。因此,对于我们的Firefox Incognito快捷方式,我们最终得到了一个如下所示的目标(Target):“C:Program FilesMozilla Firefoxfirefox.exe”-private-window。
注意:(NOTE:)编写参数时,请确保搜索您为其创建自定义快捷方式(custom shortcut)的应用程序支持的命令行参数列表。启动应用程序时,使用不受支持的参数可能会导致问题。
完成编辑快捷方式后,单击或点击(click or tap) 应用(Apply)或确定(OK)以保存所做的更改。
从现在开始,每当您双击或双击快捷方式时,它都会使用您添加到其中的命令行参数启动其目标应用程序。(target app)
PS虽然您可以将修改后的快捷方式保留在原来的位置或创建它的位置,但现在您可能还希望将带有参数的快捷方式固定在您想要的任何位置:在您的任务栏、开始菜单(Start Menu)、桌面等。
您想为哪些快捷方式添加启动参数?
如您所见,在Windows 10中为快捷方式添加命令行参数很容易,并且不需要太多工作。您创建了哪些带有参数的快捷方式?您(Did)是否想通过添加命令行参数来自定义一些现有的快捷方式?为什么您想知道如何在Windows 10中使用参数创建快捷方式?
How to create shortcuts with parameters in Windows 10
Did you know that Windows 10 allows you to change shortсuts by adding command-lіne parameters to them? Or that you can also make new shortcuts with arguments, so that they open their target aрplіcations with some of their features turned on or off, automatically? If yoυ want to learn how to add launch options to your Windows 10 аpplications, using their shortcυts, read on:
What is a shortcut parameter, also known as shortcut argument?
Before we show you how to create shortcuts with parameters and how to add arguments to shortcuts that are already available, you should first know what they are. Shortcut parameters are special commands that can alter the way apps run when you launch them using their shortcuts. Thus, a shortcut with launch arguments can enable or disable certain features of the app it opens.
For example, by adding a special parameter to a browser's shortcut, you can make it launch in its Incognito mode automatically. Similarly, some games allow you to use shortcut arguments for enabling cheats, configure their graphics settings, and others, automatically.
How to add launch parameters to a shortcut, in Windows 10
First, find the shortcut to which you want to add launch parameters, or create a shortcut towards the executable file of the program that you intend to open using command-line arguments. If you don't know how to create a shortcut, you can find all the information here: Create shortcuts for apps, files, folders, and web pages in Windows 10.
Then, right-click or touch and hold on your shortcut, and select Properties on its contextual menu to open the shortcut's Properties window. Alternatively, you can also select the shortcut and simultaneously press the Alt + Enter keys on your keyboard.
The shortcut's Properties window is the place where you can add command-line parameters for that shortcut. Select the Shortcut tab and look for the Target field.
Target tells the shortcut what app it should launch. In the example below, you can see that we chose to create and use a shortcut that points to Firefox.
To add launch parameters to the shortcut, click or tap inside the Target text field, and type all the arguments you want to add to it, at the end of the line. Each of the additional launch parameters must be preceded by a blank space and a hyphen.
In our case, because we wanted to create a shortcut that opens Firefox in its private mode, we had to add the "-private-window" command-line parameter. So, for our Firefox Incognito shortcut, we ended up with a Target that looked like this: "C:Program FilesMozilla Firefoxfirefox.exe" -private-window.
NOTE: When writing the parameters, make sure you search for the list of command-line parameters supported by the application for which you create the custom shortcut. Using unsupported parameters can cause problems when you start the application.
When you are done editing the shortcut, click or tap Apply or OK to save the changes you've made.
From now on, whenever you're double-clicking or double-tapping the shortcut, it launches its target app using the command-line parameters that you've added to it.
P.S. Although you can leave your modified shortcut where it was or where you've created it, now you might also want to pin your shortcut with parameters anywhere you want to: on your taskbar, Start Menu, the desktop, and so on.
For what shortcuts did you want to add launch parameters?
As you can see, adding command-line parameters to shortcuts in Windows 10 is easy, and it doesn't require much work. What shortcuts with arguments did you create? Did you want to customize some of your existing shortcuts by adding command-line parameters? Why did you want to know how to create shortcuts with parameters in Windows 10?