Azure Devops:安装 Windows 服务

Azure Devops: installing a Windows Service

我正在尝试使用 Azure DevOps 管道自动安装 windows 服务。我从这里安装了 Windows 服务管理器:https://marketplace.visualstudio.com/items?itemName=MDSolutions.WindowsServiceManagerWindowsServiceManager 并将其作为任务添加到管道中。 windows 服务应该安装在管道所在的虚拟机上,所以我提供了“LocalSystem”作为 运行 作为用户名,没有提供密码。该服务未安装并出现以下错误: 由于以下错误,无法创建服务“(MyServiceName)”: 帐户名无效或不存在,或者密码对于指定的帐户名无效

我也尝试了用于访问虚拟机的凭据,但它给出了同样的错误。如何解决? 添加: 使用 installutil 可以毫无问题地安装该服务。

Azure Devops: installing a Windows Service

你可以尝试使用deployment groups来测试,如果你使用的是私人代理:

作为 document 状态:

Service Name - The name of the Windows Service installed on the Deployment Group Target.

您还可以参考 similar thread 了解更多详情。