MSI_IsPackageInstalled
Description
Section titled “Description”Tests whether the product in the specified MSI package file is installed. The function reads the product code from the file, so the file must exist. If it doesn’t, the function returns FALSE.
Syntax
Section titled “Syntax”MSI_IsPackageInstalled(sMSIFile, bMustBeInstalled) As Boolean
Parameters
Section titled “Parameters”sMSIFile (String)
Section titled “sMSIFile (String)”Path and filename of the MSI-package
bMustBeInstalled (Boolean)
Section titled “bMustBeInstalled (Boolean)”Function will return false if bMustBeInstalled is true and package is not installed
Return value
Section titled “Return value”Result will be stored in gbValue.
gbValue is TRUE if Windows Installer knows the product on the computer. This includes products that are only advertised, or installed for another user. To check that the product is fully installed, use MSI_GetPackageStatus instead.
Example
Section titled “Example”If bStatus Then bStatus = MSI_IsPackageInstalled("C:\CapaInstaller.msi", False)If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)Related functions
Section titled “Related functions”MSI_InstallPackage MSI_UnInstallByFile MSI_GetPackageStatus Constants Package Property Variables