From dcb2a638dbf29dca6fd3aefea4b21e794fc00e3d Mon Sep 17 00:00:00 2001 From: James Fantin-Hardesty <24646452+jfantinhardesty@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:45:51 -0700 Subject: [PATCH] Fix widows service install command --- cmd/service_windows.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/service_windows.go b/cmd/service_windows.go index 36269deb4..53bf5151a 100644 --- a/cmd/service_windows.go +++ b/cmd/service_windows.go @@ -70,13 +70,9 @@ var installCmd = &cobra.Command{ Example: "cloudfuse service install", FlagErrorHandling: cobra.ExitOnError, RunE: func(cmd *cobra.Command, args []string) error { - dir, err := os.Getwd() - if err != nil { - return fmt.Errorf("unable to determine location of cloudfuse binary [%s]", err.Error()) - } - programPath := filepath.Join(dir, "windows-startup.exe") + programPath := filepath.Join("C:", "Program Files", "Cloudfuse", "windows-startup.exe") startupPath := filepath.Join(os.Getenv("APPDATA"), "Microsoft", "Windows", "Start Menu", "Programs", "Startup", StartupName) - err = makeLink(programPath, startupPath) + err := makeLink(programPath, startupPath) if err != nil { return fmt.Errorf("unable to create startup link [%s]", err.Error()) }