更新6-11-15:我发现了有关此错误的更多相关信息。
此日志片段显示Windows安装程序无法找到注册表项:http://pastebin.com/JBH3DukW
我检查了我的注册表,该密钥已经消失了!然后当安装退出并失败时,它会立即返回。我坚信密钥被删除两次,第二次删除导致安装程序失败。我已经缩小了相关组件的xml帖子。这听起来像是对你的双重删除吗?这是我的代码中的东西吗?
安装程序GUI吐出错误:
“无法读取关键SYSTEM \ CurrentControlSet \ services \ lr-grafana \ Parameters的安全信息。请确认您有足够的权限访问该密钥,或与您的支持人员联系。”
此错误仅弹出有时。我猜大概有10%的时间。无论服务是否正在运行,都会显示此错误。
<?xml version="1.0" encoding="UTF-8"?>
<Component Id="nssm.exe" Guid="{7ACB6DB9-0E50-452D-B403-689B39957A8C}">
<!-- nssm actually runs the service, so we have to set it as the key -->
<File Id="nssm.exe" Name="nssm.exe" Source="$(var.SOURCEDIR)..\Common\bin\nssm.exe" Vital="yes" KeyPath="yes" DiskId="1"/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="$(var.SERVICENAME)"
DisplayName='$(var.ProductName)'
Description='$(var.ServiceDescription)'
Start="auto"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no"
>
<util:ServiceConfig xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
FirstFailureActionType="restart"
SecondFailureActionType="restart"
ThirdFailureActionType="restart"
ResetPeriodInDays="1"
RestartServiceDelayInSeconds="60"
/> <!-- note: Windows Service Properties only displays the RestartDelay in min -->
</ServiceInstall>
<ServiceControl Id="StartService" Stop="both" Remove="uninstall" Name="$(var.SERVICENAME)" Wait="yes" />
<!-- the sub reg keys needed by nssm -->
<RegistryKey
Root="HKLM"
Key="SYSTEM\CurrentControlSet\services\$(var.SERVICENAME)\Parameters"
>
<RegistryValue Type="expandable" Name="Application" Value="%JAVA_HOME%\bin\java" />
<RegistryValue Type="expandable" Name="AppParameters"
Value='-Dlogback.configurationFile=$(var.ProductKey)-logback-persistent.xml -Dservice.name=$(var.ProductKey) -classpath sqljdbc4.jar;$(var.ProductKey).jar com.Company.carpenter.Carpenter' />
<RegistryValue Type="expandable" Name="AppDirectory" Value="[INSTALLFOLDER]" />
<RegistryValue Type="integer" Name="AppStopMethodSkip" Value="6" />
<RegistryValue Type="integer" Name="AppStopMethodConsole" Value="10000" />
<RegistryValue Key="AppExit" Type="string" Value="Exit" />
</RegistryKey>
</Component>