Custom action within installer - Could not find MyAction.Installstate
I wanted to run custom action code during the Commit phase of the Setup Project.
I created an installer class and override the Commit method. I also added that installer as a custom action to the Commit phase (View->Custom Actions).
During the installation process I got an exception saying “Could not find C:/Program Files/MyApp/MyAction.Installstate”
The problem is that the MSI infrastructure is looking for the installation state file which is usually created during the Install phase. If the custom action does not participate in the Install phase, no file is created.
The solution is to add the custom action to both the Install and the Commit phases, although it does nothing during the install phase.
本文解决了在安装程序的Commit阶段运行自定义操作时出现的问题,即找不到安装状态文件。通过将自定义操作同时添加到安装和提交阶段,即使在安装阶段不执行任何操作也能创建所需的文件。
1982

被折叠的 条评论
为什么被折叠?



