Search code examples
octopus-deploy

How to fail Octopus deploy if missing vc2013 Redistributable Packages are missing


Ho can I check if the C++ redistributable packages for visual studio 2013 is installed and fail if not.

I need to check if the x64 and x86 version is installed.

https://www.microsoft.com/en-us/download/details.aspx?id=40784


Solution

  • You can use Powershell Scripts in Octopus Deploy

    Tentacle examines the exit code of PowerShell.exe to determine whether the script failed. If the exit code is zero, Tentacle assumes the script ran successfully. If the exit code is non-zero, then Tentacle assumes the script failed.

    So, write a PowerShell script that returns non-zero exit code if what you're looking for isn't installed.

    This question gives you the registry keys you're looking for, for the 2012 version. Specifically, this answer. You might just need to find what the keys are (if different) for the 2013.

    Hopefully this gives you a start in the right direction though at least.