从 Windows XP 命令行创建快捷方式(.LNK 文件)的本机方法是什么?

发布于 2024-07-13 18:01:25 字数 1552 浏览 9 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

醉生梦死 2024-07-20 18:01:25

Windows XP 及更高版本具有 fsutil 命令,该命令可以创建文件的“硬链接”。

请参阅:

Windows XP and later has the fsutil command, which can create "hardlinks" to files.

See:

噩梦成真你也成魔 2024-07-20 18:01:25

XP 没有符号链接。 在 Vista 上,该命令是 mklink。 快捷方式不是符号链接。

XP doesn't have symlinks. On Vista, the command is mklink. Shortcuts are not symlinks.

许你一世情深 2024-07-20 18:01:25

这不是本机 Windows 调用,但您可能应该查看 Windows Sysinternals 的连接。 这是一个非常方便且质量好的工具。

如果您不想依赖外部软件,则应该查看 kb205524 了解本机方法创建连接点。

This is not a native Windows call, but you should probably look into Windows Sysinternals' Junction. This is a very handy tool of good quality.

If you don't want to rely on external software, you should look at kb205524 for native ways of creating junction points.

壹場煙雨 2024-07-20 18:01:25

http://www.ss64.com/nt/shortcut.html
编辑:
抱歉我删除了那个。 ..但这是一个旧的NT命令...不知道它在XP上是否有效。

http://www.ss64.com/nt/shortcut.html
EDIT:
Sorry I deleted that. .. but that is an old NT command ... don't know if it active on XP.

分开我的手 2024-07-20 18:01:25

我的系统上有一个名为shortcut.exe 的文件。 老实说,我不知道我从哪里得到它。 :-( 但快速搜索后发现了以下网站:

http://www.optimumx.com /download/#Shortcut

也许这对你有用?

I have a file called shortcut.exe on my system. Honestly, I have no idea where I got it. :-( But a quick search came up with the following website:

http://www.optimumx.com/download/#Shortcut

Maybe that will work for you?

半世晨晓 2024-07-20 18:01:25

mklink 链接目标< /code>

不幸的是,这仅适用于 Vista/Server 2008 或更高版本。

mklink link target

Unfortunately, this only works on Vista/Server 2008 or newer.

‖放下 2024-07-20 18:01:25

实际上NTFS确实支持符号链接。 请参阅维基百科 NTFS_symbolic_link

Actually NTFS does support symbolic links. See Wikipedia NTFS_symbolic_link

倾城花音 2024-07-20 18:01:25

Windows 使用的文件系统支持软链接。
尽管任何标准 Windows 工具都没有公开此功能。

不过,有一些开源工具可以做到这一点。

Softlinks are supported by the file system used by windows.
Though this functionality is not exposed by any standard windows tools.

There are opensource tools available that can do the trick though.

我早已燃尽 2024-07-20 18:01:25

每个人似乎都在绕圈子,但我还没有看到有人真正站出来说:NTFS 支持称为“连接点”的东西,它与符号链接非常相​​似,但用处稍小。 它们不同于快捷方式和硬链接。 我经常使用它们在系统上的同一位置构建不同版本的软件(只需将构建目录链接重新指向不同的 SVN 签出)。 我为此使用的工具称为 ntfslink。 该页面还很好地解释了 NTFS 连接点如何工作以及哪些版本的 Windows 支持哪些功能。 我在 Win Server 2k3 上使用它。 ntfslink 程序是一个 shell 扩展,但还有其他类似的实用程序可以从命令行运行。 如果您想从正在开发的任何应用程序以编程方式执行此操作,还可以使用 Windows API 函数来创建它们。

Everyone seems to be beating around this bush, but I haven't seen anyone actually come out and say it yet: NTFS supports something called "junction points", which are very similar, though slightly less useful than, symlinks. These are different than both shortcuts and hard links. I use them regularly for building different versions of our software at the same location on my system (just repoint the build directory link to a different SVN checkout). The tool I use for this is called ntfslink. That page also contains a pretty good explanation of how NTFS junction points work and which versions of Windows support which features. I use it on Win Server 2k3. The ntfslink program is a shell extension, but there are other similar utilities that work from the command line. There are also Windows API functions available to create them if you want to do it programmatically from whatever app you're developing.

荒人说梦 2024-07-20 18:01:25

我不知道这是否完全回答了问题,但它确实让生活变得更轻松!

转到程序的安装位置。 创建 .EXE 或启动文件的快捷方式。 将快捷方式放在桌面上,以便您知道它在哪里! 然后将快捷方式拖到“开始”按钮(在 XP 中)。 当“开始”菜单出现时,将其放在小线上方(使其保持可见)。 嘿,快点 - 一个立即创建的 .LNK 文件,Windows 会为您完成所有工作(是的,这确实有效,当我在这里阅读问题时,我刚刚完成了/解决了它。)

I don't know if this EXACTLY answers the question, but it sure makes life easier!

Go to where the program's installed. Create a shortcut to the .EXE or startup file. Put the shortcut on the desktop so you know where it is! Then drag the shortcut to the START button (in XP). When the START menu appears, drop it ABOVE the little line (so it stays visible). Hey presto - an instantly created .LNK file with Windows doing all the work for you (yes this DOES work, I've just this second done it/worked it out when I read the question here.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文