在installshield合并模块中进行安装后操作

时间:2022-12-10 22:43:11

I am using installshield 2011. I have a merge module and I want certain exe to be executed after the merge module is installed. This exe is part of merge module files. Now when I write a custom action in the merge module, the action get executed before the files are copied into the destination location. Is there any way to execute this custom action after files are oped so that it can find exe at that location? Or is there any other way to solve this issue?

我正在使用installshield 2011.我有一个合并模块,我希望在安装合并模块后执行某些exe。此exe是合并模块文件的一部分。现在,当我在合并模块中编写自定义操作时,在将文件复制到目标位置之前执行操作。有没有办法在文件运行后执行此自定义操作,以便它可以在该位置找到exe?或者还有其他方法可以解决这个问题吗?

1 个解决方案

#1


2  

Merge Modules don't get "installed", they get merged into the installer database and that's what gets installed. In otherwords Components/CustomActions authored in the Basic MSI project and authored in the MSM project behave the same way.

合并模块没有“安装”,它们被合并到安装程序数据库中,这就是安装的内容。换句话说,在Basic MSI项目中创作并在MSM项目中创作的Components / CustomActions的行为方式相同。

Are you writing the custom action in the MSI or MSM project. The difference is the former uses the InstallExecuteSequence table and the latter uses the ModuleExecuteSequence table. All other rules apply. You probably want to schedule this after InstallFiles as Deferred with No Impersonation ( SYstem Context ). Also you probably want to use the component action state in a condition to make sure this only gets executed when the component's key file is being installed.

您是在MSI或MSM项目中编写自定义操作吗?区别在于前者使用InstallExecuteSequence表而后者使用ModuleExecuteSequence表。所有其他规则适用。您可能希望在InstallFiles之后将其安排为Deferred with No Impersonation(SYstem Context)。此外,您可能希望在条件中使用组件操作状态,以确保仅在安装组件的密钥文件时才执行此操作。

Also, consider if you need to do anything in rollback and uninstall scenarios. That and make sure that whatever this EXE is doing couldn't be done natively in MSI. ( SelfReg patterns are inferior to native declarative transactional MSI patterns. )

另外,请考虑是否需要在回滚和卸载方案中执行任何操作。这确保无论这个EXE做什么都无法在MSI本地完成。 (SelfReg模式不如本机声明式事务MSI模式。)

#1


2  

Merge Modules don't get "installed", they get merged into the installer database and that's what gets installed. In otherwords Components/CustomActions authored in the Basic MSI project and authored in the MSM project behave the same way.

合并模块没有“安装”,它们被合并到安装程序数据库中,这就是安装的内容。换句话说,在Basic MSI项目中创作并在MSM项目中创作的Components / CustomActions的行为方式相同。

Are you writing the custom action in the MSI or MSM project. The difference is the former uses the InstallExecuteSequence table and the latter uses the ModuleExecuteSequence table. All other rules apply. You probably want to schedule this after InstallFiles as Deferred with No Impersonation ( SYstem Context ). Also you probably want to use the component action state in a condition to make sure this only gets executed when the component's key file is being installed.

您是在MSI或MSM项目中编写自定义操作吗?区别在于前者使用InstallExecuteSequence表而后者使用ModuleExecuteSequence表。所有其他规则适用。您可能希望在InstallFiles之后将其安排为Deferred with No Impersonation(SYstem Context)。此外,您可能希望在条件中使用组件操作状态,以确保仅在安装组件的密钥文件时才执行此操作。

Also, consider if you need to do anything in rollback and uninstall scenarios. That and make sure that whatever this EXE is doing couldn't be done natively in MSI. ( SelfReg patterns are inferior to native declarative transactional MSI patterns. )

另外,请考虑是否需要在回滚和卸载方案中执行任何操作。这确保无论这个EXE做什么都无法在MSI本地完成。 (SelfReg模式不如本机声明式事务MSI模式。)