虽然大多数人永远不需要打开.lnk文件来编辑它,但在少数情况下可能需要或需要它。但是如何打开和编辑快捷方式文件呢?今天的超级用户问答有答案。
今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。
超级用户读者Jez想知道如何打开.lnk文件以查看“内容”并在需要时编辑它们:
A .lnk file in Windows is an actual file intended to be a shortcut to another file, but I really do want to view the contents of the .lnk file itself. However, I am finding it literally impossible to do so.
No matter what I try, my applicati*** are opening the contents of the file it points to (drag and drop into a text or hex editor, File –> Open from a text or hex editor, etc.).
Is there any way I can get a program to actually open the .lnk file itself instead of the file it points to?
有没有办法让Jez打开.lnk文件并编辑它们?
超级用户贡献者和31415、朱利安·奈特和维纳亚克为我们提供了答案。首先,31415:
Using HxD Hex Editor, you can open .lnk files just fine, as long as you do not drag and drop them.
As a workaround, open a command prompt and rename the .lnk file with a different, non-existent extension such as .lne:
You will then be able to treat the shortcut just like a regular file. When you are done, make sure to rename the file with the original .lnk extension to restore its usual functionality.
接下来是朱利安·奈特的回答:
The whole point of a .lnk file is for Windows to treat it as a link to another file, so it should be hard to edit! Perhaps it would help if you described why you want to edit it. You can change the settings of a .lnk file by right-clicking and choosing Properties.
If you really want to edit it, you need a special tool. There are a few of these around including:
I have not tried any of these, just Googled them.
You can also edit the properties via PowerShell (from this previous answer on Stack Overflow):
Since this uses the Shell COM object, you could also do this with WSH or even VBA in Office!
最后,维纳亚克的回答是:
I have tried this and it works for me on Windows 8.1:
Opening .lnk files in Notepad:
Opening .lnk files in HxD Hex Editor:
Opening .lnk files using the command prompt:
Opening .lnk files in just about any program:
有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。
windows10的一个习惯是在打开电脑时重新打开以前打开的应用程序。如果你不想让你的机器这样做,你宁愿从头开始打开你的应用程序,你可以禁用这个功能。 ...
Windows做了很多正确的事情,但我们也学会了忍受很多烦恼。其中一些问题是大规模的问题,比如Windows无法启动时,但是如果您知道应该在哪里查找,您实际上可以解决许多较小的问题。 ...
...存驱动器、外部硬盘驱动器和SD存储卡,但当暴露于利用Windows中自动运行或自动播放的受感染设备时,可以将其传输到计算机。 ...
... 在Windows中创建新快捷方式。 自动化数据输入工作和自动填写在线表格。 扩展缩写,例如将“IDK”扩展为“我不知道” 通过键盘...
虽然您可以在没有它的情况下执行大量调整,但有经验的Windows用户知道,修改注册表可以解锁Windows中的许多新功能。尽管注册表给了你很多对系统的控制,但它并不是最容易导航的工具。 ...
...。首先是易用性,其次是充分利用主屏幕小部件。下面是如何将快捷方式排序到文件夹中。 如果您的iPhone或iPad运行的是iOS 14或iPadOS 14及更高版本,您可以将所有快捷方式排序到不同的文件夹中。这比没完没了地滚动找到一条捷...
...之类的应用程序中启动新行。 类似的快捷方式也可以在Windows上使用。 相关:42+文本编辑键盘快捷键,几乎无处不在 选择文本 您可以单击并拖动以突出显示文本,但使用以下键盘快捷键可以更快地完成此操作: Shift+向左或...
Windows和许多第三方应用程序将其设置存储在注册表中。有许多选项(特别是Windows本身的选项),您只能在注册表中更改。让我们打开注册表编辑器,这样您就可以编辑这些! 什么是注册表编辑器(the registry editor)? Windows注册...
...实时照片保存为GIF到您的相机卷。 相关:什么是GIF,你如何使用它们? 将实时照片效果保存为gif 如果不想将实时照片转换为其他格式,可以使用实时照片的循环效果作为解决方法。 从照片应用程序中选择实时照片,然后向上...