如何自定义压缩文件中的快捷方式以从当前目录运行exe?

发布于 2024-10-28 09:12:28 字数 189 浏览 1 评论 0原文

如何自定义压缩文件中的快捷方式以从当前目录运行exe?例如,我想在winrar中压缩两个文件,第一个是program.exe,第二个是该程序的快捷方式,如果我将其压缩在rar扩展名中,并将压缩文件复制到其他目录中并使用winrar打开并运行快捷方式,我什么也得不到。所以我的问题是在快捷方式中放置什么代码来运行program.exe,无论压缩文件解压在哪个目录中?

How to customize shortcut in compressed file to run exe from current directory? For example, i want to put compress two file inside winrar first is program.exe and the second is shortcut to that program, if i compress that in rar extension, and copy compressed file in other directory and open with winrar and run shortcut, i get nothing. So my question is what code to put in shortcut to run program.exe regardless in which directory will be compressed file extract?

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

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

发布评论

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

评论(1

黑白记忆 2024-11-04 09:12:28

你什么也得不到,因为没有程序可以运行。压缩文件不是可以运行文件的文件存储。当您从压缩文件“运行”文件时,操作系统实际上将该文件提取到临时文件夹,然后运行它。当您 tru 并运行快捷方式时,它会被提取,但提取它的临时文件夹不包含您尝试启动的实际 .exe,因此什么也不会发生。

至于如何实现你想要的,我不知道,但如果不可能,我也不会感到惊讶。如果您从压缩文件运行 exe,为什么需要快捷方式?为什么不直接单击 .exe?

You get nothing because there is no program to run. A compressed file isn't a filestore from which files can be run. When you "run" a file from a compressed file, the OS is actually extracting that file to a temp folder and then running it. When you tru and run the shortcut, its being extracted, but the temp folder in which it was extracted doesn't contain the actual .exe you're trying to launch, so nothing happens.

As to how you achieve what you want, I have no idea, but would not be suprised if it was not possible. If you're running the exe from a compressed file, why do you need the shortcut? Why not just click the .exe?

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