From 5a43ab4e57d207bb46a49f2364f31f5413af70f7 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 28 Nov 2025 18:04:24 +0000 Subject: [PATCH] Fix Windows agent SC CREATE binPath quoting The binPath parameter value needs outer quotes when it contains embedded quotes and spaces. Without this, SC.EXE parses the value incorrectly and fails to create the service. Related to #776 --- scripts/install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index e5b99cf..8cbbff3 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -315,7 +315,7 @@ if (-not [string]::IsNullOrWhiteSpace($AgentId)) { $ServiceArgs += @("--agent-id $BinPath = "`"$DestPath`" $($ServiceArgs -join ' ')" # Create Service with error handling -$scOutput = sc.exe create $AgentName binPath= $BinPath start= auto displayname= "Pulse Unified Agent" 2>&1 +$scOutput = sc.exe create $AgentName binPath= "$BinPath" start= auto displayname= "Pulse Unified Agent" 2>&1 if ($LASTEXITCODE -ne 0) { Show-Error "Failed to create service '$AgentName'.`nsc.exe output: $scOutput" Exit 1