我有一个安装MSI包的引导程序。
我怎样才能实现至少msi-package-installation被记录(详细日志记录)?我在哪里可以设置日志文件路径?因为我猜不能记录所有内容?
不,我不想要一个cmd解决方案,我需要在我的设置中实现这一点
找到LogPathVariable,但不知道它是如何工作的?
<MsiPackage SourceFile="$(var.Setup.TargetPath)" LogPathVariable="" />
谷歌搜索了很多次,没有找到解决这个问题的方法,有什么帮助吗?
默认情况下(没有LogPathVariable设置)将在C:\ Users \ username \ AppData \ Local \ Temp中创建日志,MSI日志将是详细的,还将有一个日志用于引导程序。
对于自定义目标,您可以创建变量并进行设置
<Variable Name="MyLogDestination" Type="string" Value=path to where you want log created />
您可以将burn variables中的一个与部分路径结合使用。我认为
<Variable Name="MyLogDestination" Type="string" Value="[ProgramFiles6432Folder]\YourProduct\" />
可能会工作,虽然我没有尝试过。
然后,您将变量名称放在LogPathVariable中
<MsiPackage SourceFile="$(var.Setup.TargetPath)" LogPathVariable="MyLogDestination" />
这就是我做的:
在Bundle下添加Log元素:
<Log PathVariable="LOGPATH_PROP" Disable="yes" Prefix='[WixBundleOriginalSource]' Extension=".txt" />
然后在MsiPackage元素中将LogPathVariable设置为“LOGPATH_PROP”。关键是在Log元素中将Disable属性设置为yes。
这将为您创建空日志文件夹...
<Directory Id="LOGSDIR" Name="logs">
<Component Guid="GUID" Id="ID" KeyPath="no" NeverOverwrite="no" Permanent="no" Location="local" Permanent="no">
<CreateFolder>
<util:PermissionEx CreateChild="yes" CreateFile="yes" Delete="yes" DeleteChild="yes" Read="yes" ReadAttributes="yes" ReadExtendedAttributes="yes" ReadPermission="yes" Traverse="yes" GenericRead="yes" GenericWrite="yes" User="Everyone" />
</CreateFolder>
</Component>
</Directory>