Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
kardianos committed Jun 10, 2021
1 parent 17a2c7b commit a8dda22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"sync"
"time"

"golang.org/x/sys/windows"
"golang.org/x/sys/windows/registry"
"golang.org/x/sys/windows/svc"
"golang.org/x/sys/windows/svc/eventlog"
Expand Down Expand Up @@ -245,7 +246,7 @@ func (ws *windowsService) Install() error {
}

serviceType := windows.SERVICE_WIN32_OWN_PROCESS
if ws.Option.bool("Interactive") {
if ws.Option.bool("Interactive", false) {
serviceType = serviceType | windows.SERVICE_INTERACTIVE_PROCESS
}

Expand All @@ -257,7 +258,7 @@ func (ws *windowsService) Install() error {
Password: ws.Option.string("Password", ""),
Dependencies: ws.Dependencies,
DelayedAutoStart: ws.Option.bool("DelayedAutoStart", false),
ServiceType: serviceType,
ServiceType: uint32(serviceType),
}, ws.Arguments...)
if err != nil {
return err
Expand Down

0 comments on commit a8dda22

Please sign in to comment.