为什么InstallShield找不到文件?
我有一个使用 IS2009 创建的 InstallShield (InstallScript) 安装,它每天晚上都会自动构建,并且已成功使用多年。几天前,安装开始失败;进度达到 99%,然后出现错误对话框,声称安装特定文件时出错;具体消息是“系统找不到指定的文件”。
可在 WinXP 和 Win7 上重现。
这不是由于安装程序发生任何更改;这些文件已数周/数月未受影响
每次都是同一个文件,尽管它的名称后面附加了一些文本,并且具有 .rra 扩展名;据我所知,这是在将其移动到最终目的地之前提取到 Windows 临时文件夹的临时文件。
同一文件夹中同一类型的其他文件已成功安装。它也不是最后一个要安装的文件;当错误消除时,安装将退出,并且同一文件夹和其他位置中的其他文件也会丢失。
该文件是常规动态文件链接,是功能的一部分;它不会被 InstallScript 或任何其他可能引入外部问题的东西所操纵。该文件与成功安装的许多其他文件之间的链接没有区别。
安装程序构建期间没有错误; IS 似乎找到了这些文件,我打开了构建的 cab 来验证该文件是否在里面。
目标计算机上的 .ilg 日志文件或 Windows 事件日志中没有出现错误或相关信息。
我尝试删除 IS 项目和所有临时构建文件,然后从版本控制中检出新副本并从头开始重建,但问题仍然存在。
这是怎么发生的?我还可以从哪里寻找原因?
I have an InstallShield (InstallScript) installation, created using IS2009, that's built automatically every night, and has been used successfully for years. A few days ago, installs started failing; progress reaches 99%, then an error dialog comes up claiming that there was an error installing a particular file; the specific message is "The system cannot find the file specified".
Reproducible on both WinXP and Win7.
This isn't due to any change in the installer; those files have been untouched for weeks/months
It's the same file every time, though it has some text appended to its name, and has an .rra extension; from what I've read, this is the temporary file that IS extracts to the Windows temp folder prior to moving it to its final destination.
Other files in the same folder and of the same type are installed successfully. It's also not the last file to be installed; when the error is dismissed, the install quits and other files both in the same folder and elsewhere are missing as well.
The file is a regular dynamic file link that is part of a Feature; it's not being manipulated with InstallScript or anything else that could introduce external problems. There's no difference in linking between that file and many others that are installed successfully.
No errors during installer build; IS appears to find the files just fine, and I opened the built cab to verify that the file is inside.
No errors or related info appear in the .ilg log file or Windows event logs on the target machine.
I tried deleting the IS projects and all temporary build files, then checked out fresh copies from version control and rebuilt from scratch, but the problem persists.
How could this happen, and where else might I look in tracking down the cause?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,InstallShield 会扫描具有相同内容的文件,并且为了减少安装程序文件的大小,仅包含其中一个文件。安装时,主文件作为 rra 写入磁盘,然后复制以创建具有相同内容的任何其他文件。
在我们的例子中,我们最近在不同的位置添加了一个新文件,具有不同的名称,其内容与现有文件完全相同。作为安装的一部分,我们删除包含原始文件的文件夹,假设在安装后期之前没有任何内容触及它。但是,一旦引入其他文件,InstallShield 就会在安装早期(删除操作之前)开始将 rra 版本写入该文件夹。删除操作删除了 rra,当真正轮到它时,InstallShield 就无法找到它了。
希望这可以帮助其他人,因为这种特定的 InstallShield 行为以及一般的 rra 文件的使用似乎没有在任何地方记录。
It turns out that InstallShield scans for files with identical content and, to reduce installer file size, includes only one of the files. On install, the master file is written to disk as an rra, and then copied to create any other files with the same content.
In our case, we had recently added a new file, in a different location and with a different name, that had exactly the same content as an existing one. We remove the folder containing the original file as part of the install, assuming that nothing touches it until later in the install. But once the other file was introduced, InstallShield started writing the rra version to the folder early in the install, before the delete action. The delete removed the rra, which InstallShield was then unable to find when its turn actually arrived.
Hopefully this helps someone else down the road, since this particular InstallShield behavior, and the use of rra files in general, does not appear to be documented anywhere.