MSI 按需安装最佳实践?
我正在为我们的产品开发一项新功能,其中的一个组件具有一些相当重大的安全隐患:它作为 WCF 服务运行,并执行一些高权限操作。 因此,我希望仅在用户需要时安装该组件(并在不再需要时将其删除),并以编程方式完成安装。
我研究过 广告(具体来说,分配的安装),这似乎是实现这一目标的一个很好的机制。 我不确定广告功能的安装是否可以撤消,但是,这对于在不再需要时删除该组件很有用。 我也不完全确定是否可以通过广告实现程序化安装:似乎不鼓励公布 COM 类。
因此,我想知道简单地调用 msiexec 来安装/删除组件是否更明智。 该组件可以打包在单独的 MSI 中,或者作为主 MSI 的单独功能。
您使用了哪些技术来按需安装功能?
I'm working on a new feature for our product, a component of which has some fairly major security implications: it runs as a WCF service, and performs some highly-privileged actions. As such, I'd like that component to only be installed when the user requires it (and removed when it's no longer required), and for the installation to be accomplished programmatically.
I've looked into advertising (specifically, assigned installs), and it appears to be a good mechanism for accomplishing this. I'm not sure whether the installation of an advertised feature can be undone, however, which would be useful for removing the component when it's no longer required. I'm also not completely sure whether programmatic installation could be achieved with advertising: advertised COM classes seems to be discouraged.
I'm wondering, therefore, if a simple call out to msiexec to install/remove the component would be more sensible. The component could be packaged in a separate MSI, or as a separate feature of our main MSI.
What techniques have you used for installing features on demand?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过预先安装所有必要的组件,然后根据需要启动/禁用 WCF 服务来解决此问题。
I resolved this by installing all the necessary bits and pieces up front and then starting/disabling the WCF Service as required.