InstallAware 将原始目标目录保持在更新模式

发布于 2024-12-24 21:01:32 字数 239 浏览 0 评论 0原文

我正在使用 InstallAware 进行构建并支持网络更新。在安装过程中,第一次允许用户选择目标文件夹。系统还提供默认值。

一切工作正常,直到用户选择他的自定义文件夹而不是默认文件夹。在更新模式下,安装程序会将应用程序安装在默认目标目录中,而不是用户选择的目录中。根据InstallAware的文档,更新模式将首先卸载应用程序,然后再次安装。因为我以静默模式运行更新,所以安装程序将获取默认值。

我怎样才能让它安装在原来的目的地?

I am using InstallAware to make a build and also to support web updates. In the installation process, for the first time, user is allowed to choose the destination folder. The system also supplies the default value.

Everything is working fine until a user chooses his custom folder instead of default one. On the update mode, the setup installs application in the default target directory instead of the user-chosen one. As documentation from InstallAware, the update mode will first uninstall the application and then install it again. Because I run the update in silent mode, the installer will get the default value.

How can I make it install in the original destination?

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

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

发布评论

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

评论(3

就像说晚安 2024-12-31 21:01:32

幸运的是,InstallAware 默认实现非常简单的方法来实现此功能。

您可以通过设置“LOADOLDDATA”InstallAware 预定义编译器变量来跟踪各种安装参数。

如果设置为 TRUE,安装引擎将从旧版本的安装中加载特征定义和其他保存的数据(另请参阅“加载特征选择”命令以获取 IA 文档中的更多详细信息)。通常,当使用相同的已安装应用程序版本进行维护或卸载操作时,仅在相同安装版本之间加载此数据。对于此编译器变量的任何其他值,都会保留此正常行为。

或者,如果您希望在不同版本的设置之间迁移参数状态,则可以在脚本代码中使用“保存功能选择”和“加载功能选择”。

希望这对您有帮助。

Fortunately InstallAware implements by default very simple ways to achieve this functionality.

You can keep track of various installation parameters setting the "LOADOLDDATA" InstallAware predefined compiler variable.

If set to TRUE, the setup engine will load feature definitions and other saved data (see also the Load Feature Selections command for more details in IA documentation) from an older version of setup. Normally this data is loaded only in between the same versions of setup, when working on the same installed application version for a maintenance or uninstall operation. With any other value for this compiler variable, this normal behavior is preserved.

Alternatively, "Save Feature Selections" and "Load Feature Selections" can be used in your script code if you wish to migrate parameters states between different versions of a setup.

Hope this helps you.

画▽骨i 2024-12-31 21:01:32

我将尝试在即将进行的项目中利用 InstallAware 的 Web 更新;我的可行性研究的一部分包括这份白皮书,尽管是从版本 7.0 开始,我假设它仍然相关:http: //www.installaware.com/installaware_web_updates.pdf

对于您的问题,最重要的是,第 14 页指出:


确定更新客户端的位置

对于所有用户安装,请查看以下注册表项:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

对于 Just Me 安装,请查看以下注册表
钥匙:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

在这两种情况下,读取 UninstallString 字符串值的数据。一个
此字符串的典型值为:“C:\Documents and Settings\\Application Data\\.exe” REMOVE=TRUE MODIFY=FALSE 在您的
应用程序删除命令行参数 REMOVE=TRUE
MODIFY=FALSE 以及主字符串周围的双引号。
指示更新客户端位置的最终字符串(如
以及您的安装程序)应采用以下形式:C:\Documents 和
设置\\应用程序数据\\.exe


您需要读取该键值并将该值分配给 MSI 代码中的 $TARGETDIR$(我相信这就是名称)变量。

希望有帮助。您可能还想查看他们关于修补的白皮书,因为这可以避免下载完整的安装程序,以及仅包含文件增量的补丁,从而阻止完全卸载。

I'm going to be attempting to utilize Web Updates from InstallAware in an upcoming project; part of my feasibility research included this white paper, albeit from Version 7.0, I'm assuming it's still relevant: http://www.installaware.com/installaware_web_updates.pdf

Most importantly for your question, page 14 states:


Determining the Location of the Update Client

For an All Users installation look under the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

For a Just Me installation instead, look under the following registry
key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

In both cases, read the data for the UninstallString string value. A
typical value for this string is: "C:\Documents and Settings\\Application Data\\.exe" REMOVE=TRUE MODIFY=FALSE Parse this string in your
application to remove the command line parameters REMOVE=TRUE
MODIFY=FALSE as well as the double quotes surrounding the main string.
The final string that indicates the location of the update client (as
well as your setup program) should be of this form: C:\Documents and
Settings\\Application Data\\.exe


You'll need to read that key value and assign the value to the $TARGETDIR$ (I believe that's the name) variable in MSI code.

Hope that helps. You may also want to look at their white paper on patching, as this would avoid the full installer download, as well as the patches only containing file delta's, preventing the full uninstall.

梦幻之岛 2024-12-31 21:01:32

大多数安装创作工具都包含检索原始安装路径并在升级期间使用它的机制。我猜 InstallAware 没有它,所以你必须自己制作:

  • 写一个 自定义操作,查找旧安装路径
  • 此自定义操作应将安装文件夹属性设置为
  • 自定义操作必须运行的 旧路径在 CostFinalize 操作之前

请注意,仅win32 DLL, VBScript 和 WiX Toolset 自定义操作可以设置安装程序属性。

Most setup authoring tools include a mechanism which retrieves the original installation path and uses it during an upgrade. I guess InstallAware doesn't have it, so you will have to make it yourself:

  • write a custom action which finds the old installation path
  • this custom action should set the installation folder property to that old path
  • the custom action must run before CostFinalize action

Please note that only win32 DLL, VBScript and WiX Toolset custom actions can set installer properties.

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