Skip to content

Commit 4172b40

Browse files
committed
Add quotes around service bin path.
1 parent 208a1be commit 4172b40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Server/wwwroot/Content/Install-Remotely.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function Install-Remotely {
179179
Invoke-RestMethod -Method Post -ContentType "application/json" -Uri "$HostName/api/devices" -Body $Body
180180
}
181181

182-
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."
182+
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."
183183
Start-Process -FilePath "cmd.exe" -ArgumentList "/c sc.exe failure `"Remotely_Service`" reset=5 actions=restart/5000" -Wait -WindowStyle Hidden
184184
Start-Service -Name Remotely_Service
185185
}

0 commit comments

Comments
 (0)