像程序一样执行快捷方式 [英] Execute shortcuts like programs

查看:48
本文介绍了像程序一样执行快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例:您在当前目录中有一个 sSomeProgram 的快捷方式.

Example: You have a shortcut s to SomeProgram in the current directory.

cmd.exe中,你可以输入s,它就会启动程序.

In cmd.exe, you can type s and it will launch the program.

在 PowerShell 中,输入 s 给出:

In PowerShell, typing s gives:

术语s"未被识别为 cmdlet、函数、可运行程序或脚本文件.验证术语并重试.

如果你输入 s.lnkSomeProgram,它运行程序就好了.

If you type s.lnk or SomeProgram, it runs the program just fine.

如何配置 PowerShell 以像执行程序一样执行快捷方式?

How can I configure PowerShell to execute shortcuts just like programs?

推荐答案

在我的 Vista 系统上,输入 S 不会启动 lnk 文件,除非我在列表中使用 .lnk 设置了环境变量 PATHEXT.当我做.S 将在 cmd.exe 中工作,而我必须在 powershell 中执行 .\S.

On my Vista system typing S won't launch a lnk file unless I have the environment variable PATHEXT set with .lnk in the list. When I do. S will work in cmd.exe and I have to do .\S in powershell.

这篇关于像程序一样执行快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆