summaryrefslogtreecommitdiff
path: root/pkg/helper/windows_install.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-04-23 20:21:41 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-04-30 22:10:30 +0200
commitc6a74b63224effd9a7d6b2cda87c38e092b35aa5 (patch)
treef10e586ee9e9fbd1db5138aa88951f97dd8aac72 /pkg/helper/windows_install.go
parenta62bd8d0ff93c224ffed086c8e50174e08a6b45c (diff)
[bug] stop service before uninstalling it
- clear errors properly on each stop attempt - fix autostart
Diffstat (limited to 'pkg/helper/windows_install.go')
-rw-r--r--pkg/helper/windows_install.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/helper/windows_install.go b/pkg/helper/windows_install.go
index 637e80b..d2298b0 100644
--- a/pkg/helper/windows_install.go
+++ b/pkg/helper/windows_install.go
@@ -56,7 +56,7 @@ func installService(name, desc string) error {
s.Close()
return fmt.Errorf("service %s already exists", name)
}
- s, err = m.CreateService(name, exepath, mgr.Config{DisplayName: desc}, "is", "auto-started")
+ s, err = m.CreateService(name, exepath, mgr.Config{StartType: mgr.StartAutomatic, DisplayName: desc})
if err != nil {
return err
}