將 Inno Setup 安裝程序包裝在 MSI 中以便通過 AD 進行分發是否可行/明智? (Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD?)


問題描述

將 Inno Setup 安裝程序包裝在 MSI 中以便通過 AD 進行分發是否可行/明智? (Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD?)

我們的安裝程序是用 Inno Setup 編寫的,我們實際上對此非常滿意。然而,一些客戶不斷要求他們可以更輕鬆地通過 Active Directory 分發的 MSI 安裝程序。我們已經竭盡全力通過使用我們自己的選項擴展 Inno Setup 的 /LOADINF 機制,使安裝程序能夠很好地處理自動和無人值守的安裝。

為了滿足客戶要求 MSI,我一直在考慮將我們的常規安裝程序簡單地包裝在一個可能使用 WIX 創建的 MSI 中。問題是:我可以保持我們當前安裝程序提供的高可配置性嗎?在無人值守/大規模安裝場景中,我將如何通過外部 MSI 公開 Inno Setup 安裝程序的選項?

請注意,我自己還沒有真正深入研究 MSI‑creation 和 WIX。現在我只關心那些知道他們在說什麼的人是否認為這將是一種可行/明智的方法來首先投入我們的精力......

[編輯: ] 最初我認為我可以使用臨時提取和執行方法,即 MSI 將簡單地用作將 Inno 安裝程序傳送到目標 PC 並在 /VERYSILENT 模式下執行它的容器。但我猜想請求 MSI 的客戶也希望能夠從中心位置卸載甚至修改安裝,我猜在那種情況下這是不可能的,不是嗎?

PS :


參考解法

方法 1:

No, there's no way to do that while still keeping the functionality your customers are 'implicitly' asking for. The only 'wrapping' in MSI you can do is to extract it on installation and start your InnoSetup installer from the temporary location where you extracted to. MSI is a fundamentally different way of working: InnoSetup (& NSIS & most other installers) take a code‑centric approach: you 'program' the 'steps' to install your data. MSI is a database and takes a 'data‑centric' approach: you indicate what files should be installed and the MSI 'runtime' does the rest. This gives you versioning and exact control of what goes where.

In short, to give your customers what they want (i.e., the ease of deployment that MSI brings with AD), you'll need 'proper' MSI's. Good luck with that, it's a major pain IMHO. But it does give good results once you master MSI & WiX.

方法 2:

I have had this problem many times myself. Therefore, I created a standard way to approach this problem and it resulted in a wizard that will guide you through the steps. The tool will support the following:

  1. Wrap the exe in an MSI.
  2. Support Uninstall.
  3. Only show one program in "Add or Remove programs".
  4. Allow you to pass command line arguments such as /SILENT to the embedded setup when you run the MSI package with MSIEXEC.EXE.

You can get it at http://www.exemsi.com (the basic version is free)

Use my contact form and let me know what you think :‑)

方法 3:

In response to your edit: yes, what you describe will prevent doing upgrades (other than delete/reinstall) and remote configuration, since the MSI database won't know anything about the contents of your installer.

Many installer packages started MSI 'support' in this way, though: InstallShield did, for example. That's the main reason I dumped them, because installers made in that way are useless for MSI purposes. I don't know if recent versions of InstallShield are better, last time I checked was 5 years ago.

方法 4:

Its pretty easy to make a wrapper kit that automatically installs INNOSETUPper from MSI. For basic functionality (install/uninstall) this is enough. Most setuppers do not implement repair anyway.

  1. create silent.inf script for INNO Setup (optional)

  2. create install.bat that calls

    myinnosetup.exe /silent /NOCANCEL /norestart /Components="xxx"

    you can use /verysilent you can load settings from silent.inf with /LOADINF="silent.inf"

  3. create MSI setup file that calls install.bat ( with parameters if necessary)

  4. deliver all 4 files to your customer and they can deploy your Inno setupper with SMS or ActiveDirectory and everyone is happy :)

方法 5:

I would argue that it is possible to do all that you would like with an MSI wrapped Inno Setup, but it is far from trivial, and using WiX might make this particular task more difficult. In short I would not really recommend it.

But if you really would like to...

MSI files are simply database files with additional script instructions and often embed the .cab file that contains the stuff you actually want to install.

If you use Wise, you will generate default scripts that you can then add Windows Installer conditions to and control the events to a finer degree (Install, repair, modify, uninstall) so that they call equivalent actions on your Inno Setup install script which would need to be installed into and kept in a temporary folder.

(by Oliver GiesenRoelJacobRoelTomRob Hunter)

參考文件

  1. Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD? (CC BY‑SA 2.5/3.0/4.0)

#inno-setup #windows-installer






相關問題

如何從 InitializeWizard 中更改嚮導頁面的名稱和描述? (How do I change the name and description of a wizard page from within InitializeWizard?)

如何使用 Inno Setup 根據註冊表項選擇在文件夾中安裝插件/文件? (How do I use Inno Setup to optionally install a plugin/file in a folder based on a registry entry?)

Inno Setup - 透明閃屏 (Inno Setup - Transparent Splash Screen)

Instal versi Firebird yang benar (32bit atau 64bit) dengan Inno Setup (Install correct version of Firebird (32bit or 64bit) with Inno Setup)

Inno Setup - 防止提取文件將進度條設置為 100% (Inno Setup - Prevent extraction of files from setting progress bar to 100%)

在安裝期間將 .INI 文件從 UTF-8 編碼轉換為 ANSI (To convert a .INI file from UTF-8 encoding to ANSI during installation)

將 Inno Setup 安裝程序包裝在 MSI 中以便通過 AD 進行分發是否可行/明智? (Is it feasible/sensible to wrap an Inno Setup installer inside an MSI for easier distribution via AD?)

在沒有 ClickOnce 的情況下從安裝程序下載並安裝 .net framework 4.0? (Download and install .net framework 4.0 from installer without ClickOnce?)

如何在 Inno Setup 中設置“典型”和“自定義”安裝選項? (How to make a "Typical" and "Custom" installation option in Inno Setup?)

Inno Setup Windows DLL 函數調用,帶有指向結構的指針 (Inno Setup Windows DLL function call with pointer to structure)

更改 WizardForm.TasksList 偏移量 (Change WizardForm.TasksList offset)

如何在 Inno Setup 中修改錯誤信息? (How to modify error message in Inno Setup?)







留言討論