Skip to content

MSI_GetPackageStatusByGuid

Returns the Windows Installer status of the product with the specified product code (GUID).

MSI_GetPackageStatusByGUID(sGUID) As Boolean

Product code (GUID) of the MSI package, including the braces

Result will be stored in gsValue. MSI Status:

gsValue Meaning
The package is installed. The product is installed for this computer or user.
The package is not installed. The product isn’t known on this computer.
The package is advertised, but not installed. The product is advertised only.
The package is absent. The product is installed for another user.
Invalid argument. The product code isn’t valid.
Bad configuration. The Windows Installer configuration data for the product is corrupt.

To check whether a package is installed, compare gsValue with The package is installed., or use MSI_IsPackageInstalled.

If bStatus Then bStatus = MSI_GetPackageStatusByGUID("{45835CD9-B5A1-4042-84B1-4CC1B166F212}")
If bStatus Then bStatus = Job_WriteLog("Custom", "gsValue: " & gsValue, bStatus, True)

Scripting Guidelines

MSI_InstallPackage MSI_UnInstallByFile MSI_IsPackageInstalled Constants Package Property Variables