成功安装后,使VDProj .MSI安装程序在本地复制自身 [英] Make VDProj .MSI installer copy itself locally after successful install

查看:97
本文介绍了成功安装后,使VDProj .MSI安装程序在本地复制自身的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个大型C#应用程序,它跨越了许多项目,通过在.VDProj文件上运行MSBuild(或通过Visual Studio 2010)将这些项目打包为.MSI文件.安装通常可以正常进行,如果在本地计算机上找不到其他必需的软件,则可以正确发出警告.

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 required software is not found on the local machine.

但是,如果安装成功,我们希望安装程序将自身复制到程序文件中的某个特定文件夹中.例如'c:\ program files \ app \ version \ install_1.2.3.4.msi'.

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?

推荐答案

您可以从自定义操作排定在InstallFinalize标准操作之后.

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

例如,您可以编写一个简单的EXE,该EXE接收[OriginalDatabase]作为参数并执行复制操作.

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

InstallFinalize未在Visual Studio中显示.您可以在安装"下添加自定义操作,并使用 ORCA编辑MSI InstallExecuteSequence 表.

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.

这篇关于成功安装后,使VDProj .MSI安装程序在本地复制自身的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆