Deploy windows forms application and update shortcut to new release

Hi, I want to automate the deployment of a windows forms application which is used by numerous users on a terminal services server.

I can close any running instances of the application using powershell scripts before Octopus installs the new release.

The problem is the deployment will be in a new folder. That won’t help the users accessing that application because they have shortucts on their desktops pointing to a current release.

This means all the users who have access to this application needs to get their shortcuts updated to point to the new deployment.

I’ve found a powershell script that can do this but you need to know the new folder where the new release was deployed. How would the script know where the new deployment folder is?

Is this at all possible?

Hi Johannes,

Thanks for getting in touch! It looks like you need access to the installation path of the step that deploys you WinForms App in the subsequent step that is responsible for updating the shortcut.

If that’s the case then you can use Octopus.Action[NAME OF THE STEP THAT DEPLOYS THE APP].Output.Package.InstallationDirectoryPath output variable.

If you haven’t used output variables in your scripts before then we have a few code snippets that can help you get started.

Please let me know how you go.

Regards,

Pawel