本文介绍了合并msi和exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的部署项目创建和.msi文件和.exe文件。是否可以将这些合并到一个.exe?

My deployment project creates and .msi-file and an .exe-file. Is it possible to merge these into one .exe?

推荐答案

是的,您可以创建一个自解压安装程序,包含MSI和setup.exe引导程序文件。

Yes, you can create a self-extracting installer containing both MSI and the setup.exe bootstrapper file.

我认为可以使用WinZip做到这一点,或者您可以使用Windows的IExpress。以下是如何使用IExpress创建。您可以使用IExpress向导或手动编写配置文件,然后您可以在安装项目的后期制作步骤中执行。通过调用

I think it is possible to do that with WinZip, or you can use IExpress coming with Windows. Here is a guide how to create a self-extracting executable with IExpress. You can either use the IExpress wizard or manually write a config file which you then can execute in the post-built step of your setup project, e.g. by calling

IExpress /N /Q MySetup.sed

示例配置文件如下所示:

A sample configuration file would look like this:

[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=1
HideExtractAnimation=1
UseLongFileName=1
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=MySetup.exe
FriendlyName=My cool application
AppLaunched=CMD /C setup.exe
PostInstallCmd=
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="setup.exe"
FILE1="MySetup.msi"
[SourceFiles]
SourceFiles0=
[SourceFiles0]
%FILE0%=
%FILE1%=

有一点警告但是使用自解压安装程序。由于另一个修复这些方案是与引导程序(设置.exe)由VS2008 SP1创建。有关解决方法,请参阅以下线程:

There is a little caveat however with the self-extracting installer scenarios. Due to another fix these scenarios are broken with the bootstrapper (setup.exe) created by VS2008 SP1. For a workaround see the following thread: http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/3731985c-d9cc-4403-ab7d-992a0971f686/?ffpr=0.

这篇关于合并msi和exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 23:47