如果自定义操作失败,则返回RollBack [在InstallFinalise之后] -Basic Msi -Installshield 2012

时间:2021-10-02 22:42:45

I am creating a basic msi installer using installshield 2012 spring professional , here i have a custom dialog to collect some data from the user based on which i call a custom dll action to create a database inside the installation folder .

我正在使用installshield 2012 spring professional创建一个基本的msi安装程序,这里我有一个自定义对话框,用于从用户收集一些数据,我调用自定义DLL操作在安装文件夹中创建数据库。

I have a scheduled a dll custom action to run After InstallFinalise , I want to check the return value from the dll and if the value indicates a failure i need to abort and rollback the installation process.

我有一个预定的dll自定义操作运行在InstallFinalise之后,我想检查来自dll的返回值,如果值表示失败,我需要中止并回滚安装过程。

I have managed to catch the error and abort the installation but the issue is with the rollback .. Right now the installation aborts but the files are already created . How do i get the installation rolled back ? Is it possible .. Any ideas ??

我设法捕获错误并中止安装,但问题是回滚..现在安装中止但文件已经创建。如何让安装回滚?有可能..任何想法?

1 个解决方案

#1


2  

It is impossible to rollback after InstallFinalize. InstallInitialize and InstallFinalize mark the boundries of the windows installer transaction.

在InstallFinalize之后无法回滚。 InstallInitialize和InstallFinalize标记Windows安装程序事务的边界。

I suggest reading and understanding:

我建议阅读和理解:

Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer

Windows Installer中自定义操作的安装阶段和脚本执行选项

#1


2  

It is impossible to rollback after InstallFinalize. InstallInitialize and InstallFinalize mark the boundries of the windows installer transaction.

在InstallFinalize之后无法回滚。 InstallInitialize和InstallFinalize标记Windows安装程序事务的边界。

I suggest reading and understanding:

我建议阅读和理解:

Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer

Windows Installer中自定义操作的安装阶段和脚本执行选项