这是 Wix Bootstrapper 命令行中的错误吗? [英] Is this a Bug in Wix Bootstrapper command line?
问题描述
我已经在这里发布了一个相关的问题:Wix:Managed BA command line not有效,关于升级时传递的命令行.
I already posted a related problem here: Wix: Managed BA command line not effective, which is about command line passed during upgrade.
现在我试图探索它是如何解释命令行的.这是我的运行方法:
Now I tried to explore, how it interpret the command line. Here is my run method to do so:
protected override void Run()
{
string cmdOptions = string.Empty;
this.Engine.Log(LogLevel.Verbose, "Launching custom TestBA UX");
Debug.WriteLine("Command.Display: {0} Command.Action: {1}", this.Command.Display.ToString(), this.Command.Action.ToString());
Environment.Exit(1);
}
我知道 Wixdba 会消化它自己的命令行选项,并将额外的信息传递给我们的托管引导程序应用程序.从上面提到的帖子,日志中的这一行:
I understand that Wixdba would digest its own command line options and would pass extra to our Managed Bootstrapper Application. From above mentioned post, this line from log:
[1A44:1E54][2014-02-24T17:47:22]i301: Applying execute package: {f1d57671-5e3d-4be7-908f-5a47e72737d9}, action: Uninstall, path: C:\ProgramData\Package Cache\{f1d57671-5e3d-4be7-908f-5a47e72737d9}\BootstrapperSetup.exe, arguments: '"C:\ProgramData\Package Cache\{f1d57671-5e3d-4be7-908f-5a47e72737d9}\BootstrapperSetup.exe" -uninstall -quiet -burn.related.upgrade'
表明它正在将 -uninstall 和 -quiet 传递给缓存中的 BootstrapperSetup.exe,即已经安装在那里.
shows that it is passing -uninstall and -quiet to BootstrapperSetup.exe which is in cache i.e. already installed there.
以下是传递给 Bootstrapper 的命令行选项的结果:
Here are the results of command line options passed to Bootstrapper:
C:\bin\Debug>BootstrapperSetup.exe -quite -uninstall
C:\bin\Debug>BootstrapperSetup.exe -quite -uninstall
Command.Display:完整,Command.Action:卸载
C:\bin\Debug>>BootstrapperSetup.exe -q -uninstall
C:\bin\Debug>>BootstrapperSetup.exe -q -uninstall
Command.Display:无 Command.Action:卸载
C:\bin\Debug>>BootstrapperSetup.exe -q -u
C:\bin\Debug>>BootstrapperSetup.exe -q -u
Command.Display:无 Command.Action:安装
总结:从上面的测试来看,
- -quite 无效,而 -q 有效.
- -u 无效,而 -Uninstall 有效.
虽然,在知道这一点后,我可以在我的托管引导程序中解析 -quite 和 -u,但我想知道,如果这是一个错误或者我在这里做错了什么.
Although, after knowing this, I can parse for -quite and -u in my Managed Bootstrapper, but I would like to know, If it is a Bug or I'm doing something wrong here.
最好的问候
推荐答案
这不是错误.你必须正确拼写 quiet,它不是quite".我相信命令行的意图是接受 msiexec 会接受的内容.msiexec 不使用 -u 进行卸载(或据我所知的任何内容),但使用了 -q.
It's not a bug. You must spell quiet correctly, it's not 'quite'. I believe the intent for the command line was to accept what msiexec would accept. msiexec does not use -u for uninstall (or anything as far as I can tell), but -q is used.
不幸的是,这方面的文档不是很好.您必须阅读 WiX 源代码以获取很多此类内容.您将在 src/burn/engine/core.cpp(ParseCommandLine 方法)中准确找到引擎将为您解析的内容.
Unfortunately, the documentation on this is not very good. You'll have to read the WiX source code for a lot of things like this. You will find exactly what the engine will parse for you at src/burn/engine/core.cpp (the ParseCommandLine method).
这篇关于这是 Wix Bootstrapper 命令行中的错误吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!