diff --git a/agent-windows/ws/handler.go b/agent-windows/ws/handler.go index 87c1961..df3246b 100644 --- a/agent-windows/ws/handler.go +++ b/agent-windows/ws/handler.go @@ -105,6 +105,13 @@ func (h *Handler) handleExec(msg Message) Message { return resp } + // winget durch vollen Pfad ersetzen falls noetig + if strings.Contains(command, "winget") { + if wp := h.winget(); wp != "" { + command = strings.ReplaceAll(command, "winget ", fmt.Sprintf(`& "%s" `, wp)) + } + } + timeoutSecs := 60 if t, ok := data["timeout"].(float64); ok && t > 0 { timeoutSecs = int(t)