我想将 .msi 封装到 .exe 中以便添加:
- 硬编码文件夹位置,例如 C:\Program Files (x86)\TEST\
- 添加安装版本文件
- 使用静默安装
- 使用命令行开关(安装/卸载)
- 日志生成
- 添加 Windows 注册表足迹
微星定制:用于安装的 MSI 文件的自定义是该技术的内置功能。自定义安装有两种主要方法:
-
轻的: 可以设置公共属性在命令行上作为轻量级的定制形式,样品在这里 https://stackoverflow.com/questions/54304773/how-to-build-msi-package-on-a-linux-server/54332468#54332468 and here https://stackoverflow.com/questions/49453205/how-to-tag-or-customize-the-a-binary-for-example-of-an-installer/49589427#49589427, or...
msiexec.exe /i setup.msi ADDLOCAL="Core,Spell" SERIALKEY="1234-1234" /qn
-
重量级:使用转换(更改的数据库片段)对整个安装程序进行较大更改 - 您几乎可以更改整个包中的任何内容。
msiexec.exe /i setup.msi TRANSFORMS="mytransform.mst" /qn
Tools: 主要 MSI 工具 https://stackoverflow.com/a/50229840/129130- 可用于制作和自定义 MSI 文件的主要工具。和一些(主要)免费的 MSI 工具 https://stackoverflow.com/questions/48482545/how-can-i-compare-the-content-of-two-or-more-msi-files/48482546#48482546。 Orca 可用于进行转换 - MSI 文件的自定义片段。请参阅最后一个链接,了解如何下载/安装它。
msiexec.exe 命令行:msiexec.exe 命令行很复杂并且有些不寻常:
- msiexec.exe 命令行选项 https://learn.microsoft.com/nb-no/windows/win32/msi/command-line-options
-
Msiexec.exe 命令行 https://www.advancedinstaller.com/user-guide/msiexec.html (高级安装程序 https://www.advancedinstaller.com)
有这个古老的工具 https://superuser.com/a/296512/11906这可以帮助构建命令行。不再正式提供,但可能从档案中获得。
Links:
-
如何更好地利用 MSI 文件 https://stackoverflow.com/questions/458857/how-to-make-better-use-of-msi-files/1055861#1055861 (
actual explanation of MSI customization via transforms
)
- 如何使用调整后的设置在 /silent 模式下运行安装 https://stackoverflow.com/questions/52327442/how-to-run-an-installation-in-silent-mode-with-adjusted-settings/52338626#52338626
- MSI 重新打包 - 免费工具 https://stackoverflow.com/questions/54869537/msi-repackaging-free-tool/55034008#55034008
Further:进一步的链接 - 仅供参考,以上内容就足够了。
- 运行 .msi 安装程序后能否确定生成的命令行? https://stackoverflow.com/questions/50455640/can-the-resulting-command-line-be-determined-after-running-an-msi-installer/50455886#50455886
- 如何在Linux服务器上构建MSI包? https://stackoverflow.com/questions/54304773/how-to-build-msi-package-on-a-linux-server/54332468#54332468
- 如何在命令行将MSM文件转换为MSI文件?使用 Windows Installer SDK 或 COM 执行此操作 https://stackoverflow.com/questions/52386592/how-to-convert-an-msm-file-into-an-msi-file-on-the-command-line-doing-this-with/52406296#52406296
- 如何使用 SCCM 服务器推送带参数的 MSI https://stackoverflow.com/questions/47754283/how-to-push-msi-with-parameter-using-sccm-server/47782032#47782032
- 如何卸载危险的 MSI 包 https://superuser.com/questions/783963/automatically-select-features-for-silent-msi-install/785825#785825
- 如何标记或自定义二进制文件(例如安装程序) https://stackoverflow.com/questions/49453205/how-to-tag-or-customize-the-a-binary-for-example-of-an-installer/49589427#49589427
- Microsoft 安装程序命令行字符串参数不起作用? https://stackoverflow.com/questions/53434089/microsoft-installer-command-line-string-parameter-not-working/53436779#53436779
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)