Skip to content

Commit

Permalink
Add quotes around service bin path.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Mar 11, 2024
1 parent 208a1be commit 4172b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Server/wwwroot/Content/Install-Remotely.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function Install-Remotely {
Invoke-RestMethod -Method Post -ContentType "application/json" -Uri "$HostName/api/devices" -Body $Body
}

New-Service -Name "Remotely_Service" -BinaryPathName "$InstallPath\Remotely_Agent.exe" -DisplayName "Remotely Service" -StartupType Automatic -Description "Background service that maintains a connection to the Remotely server. The service is used for remote support and maintenance by this computer's administrators."
New-Service -Name "Remotely_Service" -BinaryPathName "`"$InstallPath\Remotely_Agent.exe`"" -DisplayName "Remotely Service" -StartupType Automatic -Description "Background service that maintains a connection to the Remotely server. The service is used for remote support and maintenance by this computer's administrators."
Start-Process -FilePath "cmd.exe" -ArgumentList "/c sc.exe failure `"Remotely_Service`" reset=5 actions=restart/5000" -Wait -WindowStyle Hidden
Start-Service -Name Remotely_Service
}
Expand Down

0 comments on commit 4172b40

Please sign in to comment.