MSI install

I am able to deploy package from octopus server to tentacle . The package being copied at tentacle named as “Packageid@Version@XXXX” and I am not sure from where XXXX is coming from, example MgdSvc-Test@S2019.5@2E9BF84FBB15A446BAA0A6AE281A9968.

I am unable to install MSI as deployed file name dynamic behavior. Could you please advise.

Hi @gaurav,

Thanks for getting in touch! When Octopus deploys a package, before extraction, the package is copied to the target and a GUID is appended to the file. Octopus will then extract this package to the desire location before completing the deployment.

I have some questions which should assist in getting your deployment working as you intend.

Would you be able to let me know how you are packaging your MSI?

Would you also be able to let me know how you are deploying the package to the target? Are you using a Deploy a Package step, or a Transfer a Package step?

How are you attempting to execute the MSI during the deployment? Are you referencing the package id you mentioned above via a script step and using a variable?

Generally when deploying an MSI, you would package it in a ZIP (or nuget), deploy the package onto the target, then use a script step to target the MSI inside the deployment directory after extraction. (This directory is different than the directory where we initially copy the package and append the GUID).

Looking forward to hearing from you and getting to the bottom of this. :slight_smile:

Best regards,
Daniel

Hi,

Thanks for the reply.

Pfb my note inline. Please take alook and respond

Thanks

Hi @gaurav,

Thanks for getting back with that information. It looks like you need to point your install msi script to the location where Octopus extracts the package. Currently it looks like you are pointing to the location where Octopus copies the package.

You can use a variable like the following in your Octopus script to target the correct directory\filename:
#{Octopus.Action.Package.InstallationDirectoryPath}\ProgramName.MSI

Octopus will evaluate this variable to the directory where the package has been extracted to.

We have a list of different variables available to you during deployment at the following location.

Let me know if this helps, or if you have any further questions here.

Best regards,
Daniel

THanks Daniel!

Using #{Octopus.Action[Deploy package to vwmazafinpsale1].Output.Package.InstallationDirectoryPath} variable in “Run an installer” I reaches to msi path but seems this variable does not capture the msi file name. So , I need the variable which capture Path\ProgramName.msi.

Please advise.

Also I am getting below error when I am choosing msi file path to #{Octopus.Action[Deploy package to vwmazafinpsale1].Output.Package.InstallationDirectoryPath}

Installing MSI

May 31st 2019 23:31:18

Info

MsiFilePath: C:\Octopus\Applications\MgdSvc-Test\MgdSvc\2019.6_6

May 31st 2019 23:31:18

Info

Action: Install

May 31st 2019 23:31:18

Info

Properties:

May 31st 2019 23:31:18

Info

Exit Code was! 1619

May 31st 2019 23:31:18

Info

Reading installer log

May 31st 2019 23:31:18

Error

Error code 1619 was returned: This installation package could not be opened.

May 31st 2019 23:31:18

Error

Verify that the package exists and that you can access it, or contact the

May 31st 2019 23:31:18

Error

application vendor to verify that this is a valid Windows Installer package.

May 31st 2019 23:31:18

Error

At C:\Octopus\Work\20190531113116-45458-384\Script.ps1:258 char:3

May 31st 2019 23:31:18

Error

  • throw "Error code $exitCode was returned: $errorMessage

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.