Thanks for getting in touch, your patience is greatly appreciated.
Based on the information provided in your query, can you please include some additional information as to what each environment’s installation directories look like?
If the directories are the same barring the environment name, perhaps you could have two values and manually build up the installation directory that you require with the this being the only difference by scoping them accordingly to the respective environment?
As an example, if your installation folder is C:\Octo\Dev\Package Version this could be instead C:\Octo\Dev\#{Octopus.Action.Package.PackageVersion} for the Dev Environment and C:\Octo\Prod\#{Octopus.Action.Package.PackageVersion} for the Prod Environment by scoping to these variables to each respective environment.
Or even simpler if you have something like C:\Inetpub\wwwroot\blue & C:\Inetpub\wwwroot\green, you could hardcode both values, scoping each to the other environment.
If I’ve misunderstood your query in any way, or you require further assistance please let me know.
At the end of my deployment I save the Package.InstallationDirectoryPath to a project variable, using the save output variable community template. I had to amend it use a SaveAs parameter (I needed 2 paths saving). Therefore the next deployment can use those project variables.