如何自定义压缩文件中的快捷方式以从当前目录运行exe?
如何自定义压缩文件中的快捷方式以从当前目录运行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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你什么也得不到,因为没有程序可以运行。压缩文件不是可以运行文件的文件存储。当您从压缩文件“运行”文件时,操作系统实际上将该文件提取到临时文件夹,然后运行它。当您 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?