开发者

Make VDProj .MSI installer copy itself locally after successful install

We have large C# application spanning many projects which is packaged into an .MSI file by running MSBuild (or through Visual Studio 2010) on a .VDProj file. The installation usually works fine, and warns correctly if other requir开发者_JAVA技巧ed software is not found on the local machine.

However, if the installation is successful, we would like the installer to copy itself to some particular folder in program files. For example 'c:\program files\app\version\install_1.2.3.4.msi'.

Does anyone know of any way of doing this?


You can get the MSI path from OriginalDatabase property. To copy the MSI you can use a custom action scheduled after InstallFinalize standard action.

For example, you can write a simple EXE which receives [OriginalDatabase] as a parameter and performs the copy operation.

InstallFinalize is not shown in Visual Studio. You can add your custom action under Install and edit the MSI with ORCA to change its sequence after InstallFinalize in InstallExecuteSequence table.

You can get more control over custom actions by using other setup authoring tools.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜