保存Windows服务的属性(Wix Installer)

时间:2016-03-08 16:08:42

标签: c# wix windows-services

我使用wix生成Windows服务的安装程序。我需要保存“备份”属性,如“登录”和“恢复”,当我安装新版本的Windows服务时,再次应用此属性。这个想法是这些属性不会丢失。

enter image description here

2 个答案:

答案 0 :(得分:1)

您可以将这些设置为安装服务的一部分。

对于LogOn,请参阅ServiceInstall元素上的Account属性。如果您使用的是非内置用户帐户并使用密码,它还具有Password属性。如果您使用的是NT AUTHORITY \ LocalSystem,则不需要。 http://wixtoolset.org/documentation/manual/v3/xsd/wix/serviceinstall.html

要设置恢复选项,请查看WixUtilExtension中的ServiceConfig元素:http://wixtoolset.org/documentation/manual/v3/xsd/util/serviceconfig.html

答案 1 :(得分:0)

您可以在exe.config

中存储服务的设置