如何确定 WiX 安装程序是安静的还是交互式的?
WiX 中是否有办法确定安装程序是在安静模式下运行还是以交互方式运行?
Is there a way within WiX to determine if the installer is being run in quiet mode or interactively?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的 google-fu 终于启动了。显然有一些内置属性可以用来确定 UI 级别。
http://msdn.microsoft.com/en-us /library/aa372096%28VS.85%29.aspx
My google-fu finally kicked in. Apparently there are some built-in properties that you can use to determine the UI level.
http://msdn.microsoft.com/en-us/library/aa372096%28VS.85%29.aspx
最近,我们在团队中开发了新的捆绑 WiX 安装程序,其中我们的自定义引导程序应用程序继承自标准
BootstrapperApplication
,并且我们正在检查安装是否是静默的,如下所示:Recently we developed new bundled WiX installers in our team where we had our custom bootstrapper application inheriting from standard
BootstrapperApplication
and we were checking whether the installation is silent like this:对于现在访问此内容的任何人,您可以在 WiX 中执行 Condition.NOT_Silent 或 Silent。 ManagedAction 类支持这一点,例如在执行时
project.AddAction(new ManagedAction(CustomActions.RunAfterInstall, Return.check, When.After, Step.InstallFinalize, Condition.NOT_Installed));
For anyone visiting this now, you can do Condition.NOT_Silent or Silent in WiX. ManagedAction classes support that, for example when doing
project.AddAction(new ManagedAction(CustomActions.RunAfterInstall, Return.check, When.After, Step.InstallFinalize, Condition.NOT_Installed));