VMware Cloud Community
WGW1969
Contributor
Contributor

VMWare Installer Command line response

I have a question about VMWare InstallerBuilder.

I have been unable to find a discussion category for this product.  I hope that VMware{code} is a good enough fit.

We have an installer that we run from the command line on Windows OS platforms.

This installer was built until now using a product that produced a .msi file for our windows installer.

We would like to migrate from our current product to using an installer built using VMWare InstallBuilder.  InstallBuilder produces an executable, not a .msi file.

Question:  is there some way using the command line to query the installer .exe to determine the version it intends to install?

This is necessary, because we have scripts that compare the version of the installer with the version currently deployed.  We may do an abort based on the version information the installer returns.

It is possible to query an .msi file for this information:

https://joelitechlife.ca/2021/04/01/getting-version-information-from-windows-msi-installer/

But, I do not see anything in the User Guide for how I could do this against the .exe file produced by VMWare InstallBuilder

Labels (1)
Tags (1)
Reply
0 Kudos
4 Replies
scott28tt
VMware Employee
VMware Employee

There is an InstallBuilder area, I’ve reported your thread so moderators should move it there.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
WGW1969
Contributor
Contributor

That's great.  Can you please provide me with a URL to the InstallBuilder area?

I find this website very confusing.

Thanks.

PS:  Is an area a discussion?  A community?

Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

Look at the path just above your thread, it's been moved now:

Screenshot 2022-04-29 at 09.28.27.png

I use the term "area" to mean a sub-forum, the whole community has a hierarchical structure, most of the top-level ones (such as Cloud & SDDC) are the headings across the top of the screen and each one has sub-forums related to specific products and technologies:

Screenshot 2022-04-29 at 09.30.13.png

Anyway, your thread is now in the correct place.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
michieldhont_
Hot Shot
Hot Shot

Hi @WGW1969,

Please accept my apologies for the late reply. Regarding your question, though there is no built-in way to check an MSI file's version it should be possible to do by writing a powershell script like the one provided as an example in the link. You can then run that script and store the stdout value in an installer variable:

<runProgram>
    <program>.\get_msi_version.ps1</program>
    <programArguments>-MSIPATH .\JoeTest.msi</programArguments>
    <workingDirectory>${installdir}/bin</workingDirectory>
</runProgram>

<setInstallerVariable name="MSIVersion" value="${program_stdout}"/>

You can then use that variable in the installer liogic:

      <throwError text="This is a newer version, the installer will exit now">
          <ruleList>
            <compareVersions>
              <version1>10.13.1</version1>
              <logic>greater</logic>
              <version2>${MSIVersion}</version2>
         </compareVersions>
          </ruleList>
        </throwError>

Of course instead of throwing an error and exiting you could also apply this logic to other actions.

Would that work for you?

Regards,

Michiel

Reply
0 Kudos