例如:在当前目录中有一个快捷方式s
到SomeProgram
。执行程序快捷方式
在cmd.exe
中,您可以键入s
,它将启动该程序。
在PowerShell中,键入s
给出:
The term 's' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
如果键入s.lnk
或SomeProgram
,它运行的程序就好了。
如何将PowerShell配置为像程序一样执行快捷方式?
cmd自动添加当前目录“。”。到你的PATH环境变量。 PowerShell认为这是一种安全风险,并强制您明确键入。\路径。 在linux中,你可以添加“。”到你的PATH环境变量来恢复“危险的”行为... – Jaykul 2008-09-16 01:41:22
我想你也必须输入完整的文件名s.lnk,因为slipsec说 – Jaykul 2008-09-16 01:47:51