iexpress硬编码的提取目标文件夹? [英] iexpress hard-coded extraction destination folder?

查看:143
本文介绍了iexpress硬编码的提取目标文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iexpress制作自解压可执行文件.有没有一种方法可以对提取目标文件夹(最好是在临时文件夹中)进行硬编码,以免提取弹出消息请输入要放置扩展文件的位置".对话吗?

I'm using iexpress to make a self extracting executable. Is there a way I can hard-code an extraction destination folder (preferably into a temp folder somehwere) so as to not have the extraction pop up the "Please type the location where you want to place the extraced file." dialog?

推荐答案

没有直接的方法可以做到这一点. (您可以在更长的时间内看到我的其他答案对此进行解释.)

There's no direct way to do this. (You can see my other answer for a longer explanation about it.)

最简单的解决方案是制作一个运行安装程序"的IExpress存档,该存档实际上只是一个批处理文件,可将提取的文件复制到需要的地方.

The easiest solution is to make an IExpress archive that runs an "installation program", which is really just a batch file that copies the extracted files where they're needed.

在IExpress中,您将启动批处理文件,例如:cmd /c persist.bat.而persist.bat看起来像:

In IExpress, you'd launch the batch file like: cmd /c persist.bat. And persist.bat looks something like:

@echo off
xcopy /y * "%temp%\persistent\"
del /f "%temp%\persistent\persist.bat"

(最后一行很好地掩盖了您使用此批处理文件复制提取的存档的事实.)

(The last line is a nicety to hide the fact that you used this batch file to copy the extracted archive.)

这篇关于iexpress硬编码的提取目标文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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