Search code examples
c#windows.net-corewixwindows-installer

Microsoft.Deployment.WindowsInstaller.ProductInstallation.AllProducts alternative in .NET Core


We were using ProductInstallation.AllProducts to check if a product is installed on Windows:

public static bool isProductInstalled(string productCode) {
            ProductInstallation instProd = ProductInstallation.AllProducts.FirstOrDefault(p => p.ProductCode == productCode);
            return (instProd != null && instProd.IsInstalled);
        }

Is there any alternative to it in .NET Core?


Solution

  • You can keep using DTF libraries with .NET Core on Windows.