MSI 安装程序是否可以安装文件并终止而不留下足迹?

发布于 2024-09-30 18:54:42 字数 293 浏览 0 评论 0原文

我使用旧版本的InstallShield只是简单地将文件复制到本地硬盘,然后中止,这样安装程序就不会创建任何足迹,例如HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall {我的 GUID} 和 C:\Program Files\InstallShield 安装信息{我的 GUID}。

我想将我的安装程序更改为 MSI,但我不知道 MSI 是否可以做同样的事情,因为我只知道如果我中止,MSI 将回滚。

如果我可以用 MSI 做到这一点,我该怎么做?

TIA。

I use the old version of InstallShield just simply to copy the files to the local hard disk, and then to abort, so that thie installer doesn't create any foot prints, such as, HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall{my GUID} and C:\Program Files\InstallShield Installation Information{my GUID}.

I want to change my installer to MSI, but I do not know if MSI can do the same thing, since all I know if I abort, MSI will rollback.

If I can do it with MSI, how can I do it?

TIA.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凡间太子 2024-10-07 18:54:42

不,MSI 的目的是集成到 Windows 中,例如允许通过控制面板管理已安装的应用程序。因此,通过 .msi 文件安装的组件始终会在 Windows Installer 数据库中留下痕迹。

No, the point of MSI is to integrate into Windows e.g. to allow for installed applications to be managed via Control Panel. Therefore, components installed via an .msi file always will leave a footprint in the Windows Installer database.

猫九 2024-10-07 18:54:42

你想走多远?您只是想在“添加/删除程序”中隐藏您的产品条目,还是真的希望 MSI 甚至不记得它尚未安装? IE无需卸载、修复、升级、打补丁。

如果希望是前者,请查看 ARPSYSTEMCOMPONENT属性。如果你想要的是后者,你想制作一个“特洛伊木马 MSI”。请注意,许多专家反对这样做,但我偶尔会这样做,就像微软和谷歌等大公司的团队一样。要创建特洛伊木马 MSI,您故意在安装程序中省略发布标准操作,例如 发布产品操作。您需要真正确定自己了解自己的目标是什么以及这样做时要放弃什么,但有时这是有意义的。

更新:OP 表明目的是修补已安装的 MSI。

这确实不应该做。您应该使用 MSI 和 MSP 进行适当的更新/修补。然而,你所要求的都是可以做到的。在我工作过的一个地方,他们有一种叫做“不是补丁,而是补丁”的东西。它非常丑陋,但确实有效。意识到您将永远无法修复补丁(除非重新应用它),并且您还可能遇到修复 MSI 会撤消补丁的情况,因此您必须再次应用补丁。当然,在“添加/删除程序”中不会卸载补丁或版本控制工件。

所以是的,这是可以做到的,但老实说我不建议你这样做。我只是在那份工作中“支持”它,因为其他人将其投入使用,并且业务领域已经习惯了它作为一种(假)服务模式。

How far do you want to take this? Do you simply want to hide your product's entry in Add/Remove Programs or do you literally want MSI to not even remember that it's not installed? I.E no uninstall, repair, upgrading, patching.

If the desire is the former, take a look at the ARPSYSTEMCOMPONENT Property. If the desire is the latter you want to make a "Trojan MSI". Note many experts are against this but I've done it on occassion as have teams at big companies such as Microsoft and Google. To create a Trojan MSI you intentionally leave out the Publish standard actions in your installer such as the PublishProduct Action. You need to be really sure you understand what your goals are and what you are giving up in doing this but there are times when it makes sense.

Update: The OP indicates the purpose is to patch installed MSI's.

This really shouldn't be done. You should do proper updates / patches with MSI's and MSP's. However, what you ask for can be done. At a place that I have worked at they had something called the "not a patch, patch". It's pretty ugly but does work. Realize you'll never be able to repair the patch ( except to reapply it ) and you can also get into situations where repairing the MSI undoes the patch so you have to apply the patch again. Of course there's no uninstalling of the patch or versionining artifact for it in Add/Remove programs.

So yes, it can be done but I honestly don't suggest that you do it. I only "supported" it at that job because someone else put it into use and the business area had gotten used to it as a (fake)servicing pattern.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文