Enable MSI Logging with WIX by default

倖福魔咒の 提交于 2019-12-12 17:34:55

问题


I am currently writing an installer for my software, and would really like to log the install. I am using Wix. However, the only ways i have seen to log the install are to change the reg (as a global setting) and add it as a command from the command line using /l*v or something similar. what I would like to do, is log, as soon as the installer is run, only for that installer, without modifying the registry key for that single install. Is there anyway i can do this or something close to this?

thanks in advance.


回答1:


See: MsiLogging property

The problem is it's only available starting with MSI 4.0. There's also a bug in Windows 7 where sometimes uninstall from Add/Remove programs will fail because explorer loses where the temp directory is. Additionally it creates Msiabcxyz.log (abcxyz is some random hash) in the TEMP directory that can be hard for users to identify.

You could also wrap the MSI in an EXE bootstrapper and pass the logging flags in that way. It can fail though if the path (directory) doesn't exist.

All in all, I wouldn't bother. Create a .bat file that calls the install with logging for your testing and only enable logging in production when there is a problem. Otherwise it just slows your install down.



来源:https://stackoverflow.com/questions/27964714/enable-msi-logging-with-wix-by-default

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