在项目部署中包括.MSI文件 [英] Include the .MSI file in Project Deployment

查看:109
本文介绍了在项目部署中包括.MSI文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

再见!

我正在尝试部署我的程序,并且运行良好.我得到一个.exe和.msi,可以用来安装该程序. 100%工作.但是,我想在程序中部署实际的.msi文件,以便可以链接到该文件以卸载/修复程序. 但是,由于.msi文件是在安装项目的构建后完成的,因此我无法将其作为文件包含在文件系统中,因为它尚不存在.因此,我想我会像处理实际的.exe文件一样进行操作,即添加项目输出组.我不知道 这是解决我将.msi文件添加到安装文件夹(与其他文件一样)的问题的解决方案.但是,我不能这样做,因为设置项目"没有出现在添加项目输出组"中. (请参见下面的图片.)

I'm trying to deploy my program, and it's working fine. I get a .exe and .msi with which I can install the program. 100% working. However, I'd like to deploy the actual .msi file with the program so that I can link to it for uninstalling/repairing the program. However, seeing as the .msi file is done post-build of the Setup Project, I cannot include it as a file in the File System, as it does yet not exist. So I figured I'd do it like I did the actual .exe file, that is Add Project Output Group. I don't know if this is the solution to my problem of adding the .msi file to the installation folder like the other files, or not. However, I can't do it, for the Setup Project doesn't appear in the "Add Project Output Group". (See picture below.)

那么,我该如何解决呢?任何和所有帮助表示赞赏!

So, how do I go about fixing this? Any and all help appreciated!

此致,
CNissen

Regards,
CNissen

推荐答案

如果您需要在exe文件中包含msi文件.请使用资源来实现它.

If you needed to include the msi file inside an exe.. Use resource to achive it.

在您的exe项目中添加resource.resx并使用添加文件选项添加您的msi文件.

Inside your exe project add a resource.resx and use the add files option to add you msi file.

以后,您可以提取相同的文件并执行它.

Later you can extract the same file and execute it.

如果需要,可以参考下面的链接来添加资源文件.

If you need you can refer the link below for adding resource files.

http://jeanpaulva.com/2011/01/19/将嵌入文件保存在c/


这篇关于在项目部署中包括.MSI文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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