diff --git a/edge-ai-platform/installer/app.go b/edge-ai-platform/installer/app.go index 4934b32..97adb53 100644 --- a/edge-ai-platform/installer/app.go +++ b/edge-ai-platform/installer/app.go @@ -614,7 +614,12 @@ func (inst *Installer) LaunchServer() (string, error) { binPath := filepath.Join(installDir, binName) // Read config to get relay args - args := []string{"--tray"} + // Note: on Windows the server is built with CGO_ENABLED=0 -tags notray, + // so --tray is not available. On macOS the tray-enabled build is used. + var args []string + if runtime.GOOS != "windows" { + args = append(args, "--tray") + } cfgPath := filepath.Join(platformConfigDir(), "config.json") if data, err := os.ReadFile(cfgPath); err == nil { var cfg map[string]interface{} diff --git a/edge-ai-platform/installer/platform_windows.go b/edge-ai-platform/installer/platform_windows.go index 5bc9875..780e9de 100644 --- a/edge-ai-platform/installer/platform_windows.go +++ b/edge-ai-platform/installer/platform_windows.go @@ -137,11 +137,11 @@ func installAutoRestart(installDir string) error { // Use schtasks instead of PowerShell Register-ScheduledTask // to avoid XML parsing issues on non-English Windows + // Note: do not use /RL HIGHEST — it requires admin privileges cmd := exec.Command("schtasks", "/Create", "/TN", taskName, - "/TR", fmt.Sprintf(`"%s" --tray`, binPath), + "/TR", fmt.Sprintf(`"%s"`, binPath), "/SC", "ONLOGON", - "/RL", "HIGHEST", "/F", ) if out, err := cmd.CombinedOutput(); err != nil {