Skip to content

MSI_GetPackageGUID

Returns the product code (GUID) of the specified MSI package file. The product code is read from the package’s Property table. The package doesn’t have to be installed.

MSI_GetPackageGUID(sMSIFile) As Boolean

Path and filename of the MSI Package

Result will be stored in gsValue. If the product code can’t be read, gsValue isn’t changed, so clear gsValue before the call if you need to check the result.

gsValue = ""
If bStatus Then bStatus = MSI_GetPackageGUID("C:\CapaInstaller.msi")
bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)

Scripting Guidelines

MSI_IsPackageInstalledByGuid MSI_GetPackageStatusByGuid Constants Package Property Variables