installation - 从合并模块中提取文件

标签 installation windows-installer extract merge-module orca

我想要的只是一个命令行工具,它可以将文件从合并模块 (.msm) 提取到磁盘上。换句话说,我想要 MSI 可能的相同“管理安装”功能:

msiexec/a myProduct.msi TARGETDIR="C:\myInstallation"/qn

以上仅适用于msi(据我所知)。因此,为了获得与合并模块相同的效果,我正在尝试 msidb.exe 和 orca.exe orca 的文档说明:

Many merge module options can be specified from the command line...

Extracting Files from a Merge Module

Orca supports three different methods for extracting files contained in a merge module. Orca can extract the individual CAB file, extract the files into a module tree and extract the files into a source image once it has been merged into a target database...

Extracting Files

To extract the individual files from a merge module, use the

... -x ... option on the command line, where is the desired path to the new directory tree.

The specified path is used as the root path for the extracted files. All files are extracted from the CAB file embedded in the module and placed in the specified path. The directory layout for the extracted files is based on the directory tree of the merge module.



这听起来像我需要的。但是当我尝试它时,orca 只是打开了一个编辑器(带有我指定的 msm 的信息)然后什么都不做 .我尝试了各种命令行,通常是这样开始的:

orca -x theDirectory theModule.msm

我使用“theDirectory”作为我想要的任何空文件夹。就像我说的 - 它没有做任何事情。

然后我尝试了 msidb,我做了几次尝试,如下所示:

msidb -d theModule.msm -w {存储}

msidb -d theModule.msm -x MergeModule.CABinet

在第一种情况下,我不知道要为 {storage} 放什么。在第二种情况下,事实证明文字字符串“MergeModule.CABinet”是必需的(它是保留名称)。但是,提取的文件柜不保留文件层次结构或“正常”文件名;所以我不能将它用于我的目的。

有人可以解释我在命令行选项上做错了什么吗?有没有其他工具可以做到这一点?

最佳答案

您可以使用 WiX 附带的反编译工具(称为 Dark )反编译合并模块并提取文件:

dark.exe myMergeModule.msm -x "path_to_extracted_files"

这些文件将被提取到 -x 参数中指定的路径。

注:将使用安装数据库的文件表中指定的名称提取文件,这实际上可能不是实际安装文件时使用的文件名。如果您需要使用实际文件名提取文件,请参阅我对此问题的其他答案:Extracting files from merge module

关于installation - 从合并模块中提取文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2700851/

相关文章:

C# 正则表达式,通过引用字符串提取字符串

python - 使用终端安装 python 时遇到问题

.net - 如果我正在引导我的安装,我是否必须显示 .NET EULA

windows - 在 Windows 上安装应用程序期间捕获所有更改

command-line - Windows 批处理文件不等待命令完成

java - Jsoup 选择带有多个标签的标签后的文本

vb.net - 等待安装项目在 .NET 中关闭

php - 如何安装和配置最新的xampp、php、Mysql、apache服务器,并使用dreamviewer进行配置

64 位 WiX 自定义操作

python - Scrapy/XPath 从不同的标签中提取文本 (<p> OR <li>)