diff --git a/cmd/dockerd/service_windows.go b/cmd/dockerd/service_windows.go index e41906c17f..5b0f0da09c 100644 --- a/cmd/dockerd/service_windows.go +++ b/cmd/dockerd/service_windows.go @@ -7,7 +7,6 @@ import ( "io" "log" "os" - "os/exec" "path/filepath" "time" "unsafe" @@ -148,16 +147,8 @@ func (h *etwHook) Fire(e *logrus.Entry) error { return windows.ReportEvent(h.log.Handle, etype, 0, eid, 0, count, 0, &ss[0], nil) } -func getServicePath() (string, error) { - p, err := exec.LookPath(os.Args[0]) - if err != nil { - return "", err - } - return filepath.Abs(p) -} - func registerService() error { - p, err := getServicePath() + p, err := os.Executable() if err != nil { return err }