Wix Toolset无法创建事件日志条目求助
事件日志条目未创建的Wix安装问题
参考Stack Overflow相关文章后,我在Product.wxs中添加了Util:EventSource元素,配置代码如下:
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:Util="http://schemas.microsoft.com/wix/UtilExtension"> <Product Id="*" Name="FileDeletionRecordServiceSetup" Language="1033" Version="1.0.0.0" Manufacturer="HP GIS" UpgradeCode="7ec63c63-ad12-4cc7-bf7e-138caa10380f"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate EmbedCab="yes" /> <Feature Id="ProductFeature" Title="FileDeletionRecordServiceSetup" Level="1"> <ComponentGroupRef Id="ProductComponents" /> </Feature> <UI> <UIRef Id="WixUI_InstallDir" /> </UI> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" /> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="FileDeletionRecordService" /> </Directory> </Directory> </Fragment> <Fragment> <Component Id="svcInstallation" Directory="INSTALLFOLDER"> <File Id="FileDeletionRecordServiceEXE" Source="FileDeletionRecordService.exe" KeyPath="yes"/> <ServiceInstall Id="ServiceInstaller" Type="ownProcess" Name="FileDeletionRecordService" DisplayName="FileDeletionRecordService" Description="Record file deletion for specified directory" Start="auto" Account="NT AUTHORITY\LocalService" ErrorControl="normal" /> <ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="FileDeletionRecordService" Wait="yes" /> </Component> </Fragment> <Fragment> <Component Id="cmpEventLog" Directory="INSTALLFOLDER"> <Util:EventSource Name="FileDeletionRecordSource" Log="FileDeletionRecordService" EventMessageFile="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll" /> </Component> </Fragment> </Wix>
安装过程无任何报错,但对应的事件日志条目并未创建。之后我尝试了另一篇Stack Overflow文章中的方案,仍然无效。我使用命令 msiexec /i FileDeletionRecordServiceSetup.msi /l*v install.log 生成安装日志,但未找到相关线索(日志过长无法附上)。我的Wix版本为3.1(wixproj中项目版本显示为3.1)。
内容的提问来源于stack exchange,提问作者Circle Hsiao
相关产品推荐
相关产品推荐

