fix: Windows installer server launch and auto-start issues
- Remove --tray flag from LaunchServer() on Windows (notray build) - Switch schtasks from PowerShell Register-ScheduledTask to schtasks CLI for Chinese Windows compatibility - Remove /RL HIGHEST from schtasks (requires admin privileges) - Add install log output to %TEMP%/edgeai-install.log - Add critical flag to install steps (critical failures abort) - Fix extractDir: create parent dirs before writing files - Improve findPython3: skip Windows Store stub, auto-install via winget - Enhance installLibusb: extract bundled DLL, fallback to winget Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
551dee46cc
commit
53e0ba025c
@ -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{}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user