问题
I have a bootstrapper that installs a MSI-package.
How can i achieve that at least the msi-package-installation gets logged(verbose logging)? And where can i set the log-file-path? Because I won't be able to log everything i guess?
And no, i don't want a cmd-solution, i need to implement this into my setup
Found LogPathVariable, but don't really know how it works?
<MsiPackage SourceFile="$(var.Setup.TargetPath)" LogPathVariable="" />
Googled arround many times and havn't found a solution for this problem, any help?
回答1:
The default case (no LogPathVariable set) will create logs in C:\Users\username\AppData\Local\Temp the MSI logs will be verbose, there will also be a log for the bootstrapper.
For a custom destination you can create a Variable and set it
<Variable Name="MyLogDestination" Type="string" Value=path to where you want log created />
You could use one of the burn variables in conjunction with a partial path. I think
<Variable Name="MyLogDestination" Type="string" Value="[ProgramFiles6432Folder]\YourProduct\" />
might work though I've not tried it.
You would then put your variable name in the LogPathVariable
<MsiPackage SourceFile="$(var.Setup.TargetPath)" LogPathVariable="MyLogDestination" />
回答2:
That's how I did:
Add Log element under Bundle:
<Log PathVariable="LOGPATH_PROP" Disable="yes" Prefix='[WixBundleOriginalSource]' Extension=".txt" />
and then set the LogPathVariable to "LOGPATH_PROP" in MsiPackage element. The key is to set the Disable attribute to yes in Log element.
回答3:
this will create empty logs folder for you...
<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>
来源:https://stackoverflow.com/questions/23424363/wix-bootstrapper-msi-package-logging-how