例如:在當前目錄中有一個快捷方式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