Nested variables in Windows Service configuration

I am attempting to get this string working as part of the Windows Service Config.

Windows Service
Executable path:

Is there any way to use a variable in the brackets there?

Hi Conrad,

Thanks for getting in touch! Making some assumptions there are a few things wrong with that variable. If you are trying to call Octopus.Step.Name then you would be inside the step and that variable is not yet available. If you are in another step its going to call the wrong variable.

If the windows service executable path is being run from within the package step then the following should work #{Octopus.Action.Package.CustomInstallationDirectory}

A way to trouble shoot issues with variables is to add two variables to your project OctopusPrintVariables and OctopusPrintEvaluatedVariables and set them to True.
Then run a new release/deployment and look at the Raw logs, it shows you all the variables and when they are available.

If my assumptions are incorrect, knowing where and when you are calling the variables would help, (such as in a secondary step) or using the variables output and sending me a log and I can help you troubleshoot this.

Hope this helps!