Skip to content

MSI_IsPackageInstalled

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.

MSI_IsPackageInstalled(sMSIFile, bMustBeInstalled) As Boolean

Path and filename of the MSI-package

Function will return false if bMustBeInstalled is true and package is not installed

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.

If bStatus Then bStatus = MSI_IsPackageInstalled("C:\CapaInstaller.msi", False)
If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)

Scripting Guidelines

MSI_InstallPackage MSI_UnInstallByFile MSI_GetPackageStatus Constants Package Property Variables