How do I find the MSI product version number using PowerShell?

前端 未结 3 1841
长情又很酷
长情又很酷 2020-12-28 09:08

Our end deliverable has lot of MSI files.

I would ensure whether they has correct product name and product version.

I am using Orca and doing it manually.

3条回答
  •  无人及你
    2020-12-28 09:27

    The PowerShell module "Carbon" is awesome for doing exactly this.

    I discovered it myself a few years ago while working a lot with PowerShell Desired State Configuration (DSC), which requires the Product Code (a guid) of the MSI to install. It's possible to get the product code with PowerShell natively if the application is installed on a computer, same with the version number, but Carbon can do it from the MSI.

    http://get-carbon.org/

    Import-Module -Name Carbon
    Get-MSI -Path C:\PathToMSI
    

提交回复
热议问题