How to debug failure of a custom action in an MSI/Setup project

柔情痞子 提交于 2019-12-01 12:35:06

Only the command prompt (and occasional other tools) use the greater-than symbol to indicate output redirection. Windows Installer just calls the Win32 CreateProcess API which does not process this symbol. Thus your attempt to log the results will not work. Perhaps you can rewrite your command to look like cmd.exe /c XmlPreprocess.exe /x ... > [TARGETDIR]XmlPreprocess.log (some extra quoting may be required).

For debugging purposes, you can generally get a lot more information by taking a verbose log of the installation process. It will include a listing of properties, and of custom actions it launched and their return codes. I think it will even include the fully formatted command line passed to the application in your case.

Like you say in Update 2, note that a condition of True actually means to look up whether a property of the name True is defined. If you want something that's always true, use the value 1.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!