VMware Cloud Community
zootsuitjeff
Enthusiast
Enthusiast

Downloading and executing msi installers as part of an install process

Hello,

I'm working on creating an installer for our framework, and as part of the process I need to download some msi files and run them as subinstall tasks.  The issue i'm coming across is that the url's are not getting saved using httpget.  Here is an example of the action I'm trying to invoke:

<showProgressDialog>

                            <title>Install node js</title>

                            <width>400</width>

                            <actionList>

                                <httpGet>

                                    <filename>${installdir}\tmp\node-v12.18.4-x64.msi</filename>

                                    <progressText>Downloading nodejs</progressText>

                                    <url>https://nodejs.org/dist/v12.18.4/node-v12.18.4-x64.msi</url>

                                </httpGet>

                                <runProgram>

                                    <program>${installdir}\tmp\node-v12.18.4-x64.msi</program>

                                    <programArguments></programArguments>

                                    <progressText>Installing Node JS</progressText>

                                </runProgram>

                            </actionList>

                        </showProgressDialog>

And the error I am getting is:

Error executing action <httpGet>:

Error saving URL https://nodejs.org/dist/v12.18.4/node-v12.18.4-x64.msi to C:\playatest\tmp\node-v12.18.4-x64.msi

Is this feasible to do?  What am I doing wrong or how can i debug this?

Thanks,

Jeff

Labels (1)
0 Kudos
6 Replies
michiel_dhont
Enthusiast
Enthusiast

Hi zootsuitjeff,

Could you try to enable <enableSslSupport> in your project?

<project>

  ...

  <enableSslSupport>1</enableSslSupport>

  ...

</project>

Regards,

Michiel

0 Kudos
zootsuitjeff
Enthusiast
Enthusiast

Yes I had tried that already.  If i don't have <enableSslSupport>1</enableSslSupport> included, i get this error:

Error executing action <httpGet>:

SSL support was not enabled for this installer

0 Kudos
michiel_dhont
Enthusiast
Enthusiast

In which actionList are you executing the action? Does the installdir exists before downloading the file?

0 Kudos
zootsuitjeff
Enthusiast
Enthusiast

That may have been the issue. Once I wrapped these actions within a component, it downloaded and worked correctly. thanks for the suggestion!

0 Kudos
zootsuitjeff
Enthusiast
Enthusiast

The real issue I was having was i was trying to save the file in ${installdir}\temp\some-package.msi, without creating the directory ${installdir}\temp first.  Did not realize that it wouldn't automatically create the directory for me.

0 Kudos
michiel_dhont
Enthusiast
Enthusiast

Hi zootsuitjeff​,

I'm glad to hear the issue has been solved.


Regards,

Michiel

0 Kudos