示例:你有一条捷径s
to SomeProgram
在当前目录中。
In cmd.exe
,您可以输入s
它将启动该程序。
在 PowerShell 中,输入s
gives:
The term 's' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
如果您输入s.lnk
or SomeProgram
,它运行程序就很好。
如何配置 PowerShell 以像程序一样执行快捷方式?
您还可以使用“invoke-item”cmdlet 调用快捷方式。例如,如果您想启动“internet explorer.lnk”,您可以键入以下命令:
invoke-item 'Internet Explorer.lnk'
或者您也可以使用别名
ii 'internet explorer.lnk'
另一个很酷的事情是,您可以执行“invoke-item t.txt”,它会自动打开 *.txt 文件的默认处理程序,例如记事本。
Note如果要在当前目录中执行应用程序 app.exe,则必须实际指定要执行的相对或绝对路径。 “.\app.exe”是您需要键入的内容来执行应用程序。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)