From f3c2e0de477017995741bbc5fe040068def2b11d Mon Sep 17 00:00:00 2001 From: William Dumont Date: Thu, 19 Sep 2024 11:01:31 +0200 Subject: [PATCH] add quotes windows path (#7028) --- packaging/grafana-agent-flow/windows/install_script.nsis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/grafana-agent-flow/windows/install_script.nsis b/packaging/grafana-agent-flow/windows/install_script.nsis index 0d06eae01d76..7df80ab40d34 100644 --- a/packaging/grafana-agent-flow/windows/install_script.nsis +++ b/packaging/grafana-agent-flow/windows/install_script.nsis @@ -97,7 +97,7 @@ Section "install" Call InitializeRegistry # Create the service. - nsExec::ExecToLog 'sc create "Grafana Agent Flow" start= delayed-auto binpath= "$INSTDIR\grafana-agent-service-windows-amd64.exe"' + nsExec::ExecToLog 'sc create "Grafana Agent Flow" start= delayed-auto binpath= "\"$INSTDIR\grafana-agent-service-windows-amd64.exe\""' Pop $0 # Start the service. @@ -135,7 +135,7 @@ Function InitializeRegistry nsExec::ExecToLog 'Reg.exe query "${REGKEY}" /reg:64 /ve' Pop $0 ${If} $0 == 1 - nsExec::ExecToLog 'Reg.exe add "${REGKEY}" /reg:64 /ve /d "$INSTDIR\grafana-agent-flow-windows-amd64.exe"' + nsExec::ExecToLog 'Reg.exe add "${REGKEY}" /reg:64 /ve /d "\"$INSTDIR\grafana-agent-flow-windows-amd64.exe\""' Pop $0 # Ignore return result ${EndIf}