如何在Linux服务器上构建MSI软件包? [英] How to build MSI package on a linux server?

查看:490
本文介绍了如何在Linux服务器上构建MSI软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows桌面应用程序,当前在 Linux 服务器上可用,可以在用户的​​计算机上下载.我想使用任何 EXE/DLL 在同一台 Linux 服务器上自动执行 MSI 打包过程.

I have a windows desktop application which is currently available on a Linux server for download on user's machine. I want to automate the process of MSI packaging on the same Linux server using any EXE/DLL.

我有一个 App.exe App.txt 文件.在创建 MSI 程序包之前,应从文本文件中读取一些信息并将其注入exe.仅在用户单击下载后,整个过程才必须在Linux服务器中动态发生.

I have an App.exe and App.txt file. Some information should be read from text file and injected into exe before creating an MSI package. This entire process has to happen dynamically in the Linux server only after the user clicks on download.

有人能指出我如何实现目标的正确方向吗?我想通过对任何其他/第三方工具具有最小的依赖来实现相同的目的.随时随地进行TIA.

p.s-我已经完成了有关各种安装程序的一些研发工作,但是由于它们之间的依赖关系太多,因此它们均不符合标准.

p.s - I have done some R&D about various installers but none of them were matching the criteria as they have too many dependencies.

推荐答案

误报风险 :由于以下原因,为每个用户创建新的二进制文件似乎是非常不明智的恶意软件扫描程序及其识别二进制文件已知"版本(通过散列)的能力.

False Positive Risk: Creating a new binary for every user would seem to be very unwise because of malware scanners and their ability to recognize "known" versions of binaries (by hash).

如果为每个用户创建一个新的二进制文件,则恶意软件套件可能突然开始隔离您的设置,而没有任何警告或感觉.这个问题不再是微不足道的,因为恶意软件的控制已在各处得到加强,并且以较高权限运行的设置是风险管理的主要嫌疑人".

If you create a new binary for each user, the malware suite might suddenly start to quarantine your setup without any warning or sense. This problem is not trivial anymore as malware control is hardened everywhere and setups that run with elevated rights are "prime suspects for risk management".

数字签名可以提供帮助,但这仅是对您进行设置的保证,而不能保证设置中不包含任何有害内容.没有什么比签名的恶意软件媒介更糟糕的了.实际上,可以肯定的是,该恶意软件来自您:-).注意:有些人甚至设法篡改已签名的可执行文件.后两个事实的结合非常令人不安.

Digital signatures can help, but they are merely a guarantee that you made the setup, and not a guarantee that the setup doesn't contain anything harmful. Nothing worse than signed malware vectors. In fact it is proof positive that the malware came from you :-). Note: some people even manage to tamper with signed executables. The combination of the latter two fact is very troubling.

应用程序设置 :我想从安装程序中删除此类功能和详细信息,并让应用程序本身负责在安装后首次启动时自行配置.我发现它更可靠,更容易调试.

Application Setup: I like to eliminate such features and details from the setup and make the application itself responsible for it own configuration on first launch after installation. I find this more reliable and easier to debug.

自定义配置 :您可以通过各种机制在运行时应用自定义配置信息.您应该添加转换 ,或者您可以在设置旁边创建一个批处理文件,并嵌入此信息,并将其传递给MSI或 setup.exe .

Custom Configuration: You can apply custom configuration information at runtime via various mechanisms. You should add in a transform, or you can create a batch file next to the setup with this information embedded and pass to the MSI or the setup.exe.

批处理文件? : msiexec.exe 命令行支持将参数传递给MSI.如果您将设置设计为支持这些传入"参数,则可以生成一个批处理文件,该批文件将使用此类参数来运行安装程序.

Batch File?: The msiexec.exe command line supports passing parameters to the MSI. You can generate a batch file that will run the setup with such parameters if you design your setup to support these "incoming" parameters.

msiexec.exe /i myinstaller.msi ADDLOCAL="Program,Dictionaries" SERIALKEY="1234-1234" /qn

转换 :您还可以创建一个包含参数的转换(转换是一个很小的MSI片段,其中包含对原始MSI的设置和更改):

Transform: You can also create a transform to contain the parameters (a transform is a tiny MSI fragment with settings and changes to the original MSI):

msiexec.exe /i myinstaller.msi TRANSFORMS="mytransform.mst" /qn

很难在Linux机器上创建转换,因为它们是仅Windows本身的COM结构的存储文件.我不确定这是否可能,但是也许.

A transform would be difficult to create on a Linux box, seeing as they are COM-structured storage files native to Windows only. I am not sure if it is even possible, but maybe.

某些链接 :

Some Links:

  • Can the resulting command line be determined after running an .msi installer?
  • Change Program Name and Shortcut Title during installation
  • How to make better use of MSI files

这篇关于如何在Linux服务器上构建MSI软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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