Skip to content
Permalink
Browse files

Change windows service account (#469)

This changes the windows service account. My read on various windows docs, is that this is a more correct user. This seems to work on some test machines
  • Loading branch information...
directionless committed May 1, 2019
1 parent 64031a9 commit 4eca8ffcabbbf18427b988b2d6e2003cc491a737
Showing with 2 additions and 2 deletions.
  1. +1 −1 pkg/packagekit/wix/service.go
  2. +1 −1 pkg/packagekit/wix/service_test.go
@@ -167,7 +167,7 @@ func NewService(matchString string, opts ...ServiceOpt) *Service {
si := &ServiceInstall{
Name: defaultName,
Id: defaultName,
Account: `NT AUTHORITY\SYSTEM`,
Account: `[SERVICEACCOUNT]`, // Wix resolves this to `LocalSystem`
Start: StartAuto,
Type: "ownProcess",
ErrorControl: ErrorControlNormal,
@@ -26,7 +26,7 @@ func TestService(t *testing.T) {
require.Error(t, err)
require.True(t, expectTrue2)

expectedXml := `<ServiceInstall Account="NT AUTHORITY\SYSTEM" ErrorControl="normal" Id="DaemonSvc" Name="DaemonSvc" Start="auto" Type="ownProcess" Vital="yes">
expectedXml := `<ServiceInstall Account="[SERVICEACCOUNT]" ErrorControl="normal" Id="DaemonSvc" Name="DaemonSvc" Start="auto" Type="ownProcess" Vital="yes">
<ServiceConfig xmlns="http://schemas.microsoft.com/wix/UtilExtension" FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" RestartServiceDelayInSeconds="5" ResetPeriodInDays="1"></ServiceConfig>
</ServiceInstall>
<ServiceControl Name="DaemonSvc" Id="DaemonSvc" Remove="uninstall" Start="install" Stop="both" Wait="no"></ServiceControl>`

0 comments on commit 4eca8ff

Please sign in to comment.
You can’t perform that action at this time.