xPackage unable to test if a .msp is already installed
Issue description
Hello, I try to use xPackage to install a SharePoint update https://www.microsoft.com/en-us/download/details.aspx?id=54468 Basically this is a .exe that contains a .msp file. I can install it successfully, but if I run the configuration again, DSC fails with this error:
Error: "PowerShell DSC resource MSFT_xPackageResource failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Package from F:\setup\sts2016-kb3128014-fullfile-x64-glb.exe was installed, but the specified ProductId and/or Name does not match package details"
My config:
xPackage Install201612CU
{
Ensure = "Present"
Name = "Update for Microsoft SharePoint Enterprise Server 2016 (KB3128014) 64-Bit Edition"
ProductId = "{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}"
InstalledCheckRegHive = "LocalMachine"
InstalledCheckRegKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-1014-0000-1000-0000000FF1CE}_Office16.OSERVER_{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}"
InstalledCheckRegValueName = "DisplayName"
InstalledCheckRegValueData = "Update for Microsoft SharePoint Enterprise Server 2016 (KB3128014) 64-Bit Edition"
Path = "F:\setup\sts2016-kb3128014-fullfile-x64-glb.exe"
Arguments = "/q"
RunAsCredential = $DomainAdminCredsQualified
ReturnCode = @( 0, 1641, 3010, 17025 )
DependsOn = "[xRemoteFile]Download201612CU"
}
Troublesooting
I made some troubleshooting and I think this is expected: When the update is installed, key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{90160000-1014-0000-1000-0000000FF1CE}Office16.OSERVER{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}" is created, so I think I should set "ProductId" to "{90160000-1014-0000-1000-0000000FF1CE}Office16.OSERVER{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}" but then I get this error:
Error: "The specified IdentifyingNumber ({90160000-1014-0000-1000-0000000FF1CE}Office16.OSERVER{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}) is not a valid Guid"
Besides, I tested to call manually Get-ProductEntry with those parameters and it finds the key successfully:
$Name = "Update for Microsoft SharePoint Enterprise Server 2016 (KB3128014) 64-Bit Edition"
$IdentifyingNumber = "{90160000-1014-0000-1000-0000000FF1CE}_Office16.OSERVER_{ECE043F3-EEF8-4070-AF9B-D805C42A8ED4}"
Get-ProductEntry -Name $Name -IdentifyingNumber $IdentifyingNumber
Questions
- Is xPackage unable to test if a .msp is successfully installed, or am I doing something wrong?
- Is there a better resource to use to install/test a .msp?
Thanks for your help!
@Yvand xPackage currently only works with .msi files and .msi files that are wrapped in a .exe file.