Deployment step Windows Service: Executable Path -> incorrect string formatting?

Hi all,

No matter whether I hard code the filename or use Octopus variables, the formating for the binPath parameter in the Powershell script is such that Powershell doesn’t recognize this argument.

sc.exe config “Scheduler” binPath= ““C:\Program Files\WS\Scheduler.exe”” DisplayName= “WS Scheduler” depend= “/” start= “auto” obj= “LocalSystem”

Removing the trailing "\ and " resolves the issue -> powershell runs the command just fine.

Any thoughts?

Wim D.

Hi Wim,

Thanks for reaching out. Could you share us a screenshot of where are you passing the filename value in Octopus? Also please let us know which version are you running.

Thanks,

Dalmiro

Version: 3.1.1

See attached .jpg

Hi,

Sorry for the delay. Could you tell us which version of Windows and Powershell are you running? You can get the version of Powershell by running this command from Powershell

$PSVersionTable.PSVersion

Regards,

Dalmiro