默认情况下使用WIX启用MSI日志记录 [英] Enable MSI Logging with WIX by default

查看:119
本文介绍了默认情况下使用WIX启用MSI日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为我的软件编写安装程序,并且真的很想记录安装情况.我正在使用Wix.但是,我看到的记录安装的唯一方法是更改​​reg(作为全局设置),并使用/l * v或类似方法从命令行将其添加为命令. 我想做的是在运行安装程序后立即为该安装程序记录日志,而无需为该单个安装修改注册表项. 无论如何,我能做到这一点或接近它吗?

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?

提前谢谢.

推荐答案

请参阅:问题是,仅从MSI 4.0开始才可用. Windows 7中还存在一个错误,该错误有时会由于资源管理器丢失temp目录的位置而无法从添加/删除程序"中卸载.此外,它还会在TEMP目录中创建Msiabcxyz.log(abcxyz是一些随机哈希),用户可能很难识别.

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.

您还可以将MSI包装在EXE引导程序中,并以这种方式传递日志记录标志.如果路径(目录)不存在,它可能会失败.

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.

总而言之,我不会打扰.创建一个.bat文件,该文件将调用安装程序并记录日志以进行测试,并且仅在出现问题时才启用生产日志记录.否则只会减慢安装速度.

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.

这篇关于默认情况下使用WIX启用MSI日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆