What can cause MSIExec Error 1619 ‘This installation package could not be opened’

acceptance-testingmsbuildwindows-installerwix

I'm attempting to automate a roundtrip install and uninstall of a set of MSI files (generated by WiX) from a pack of sample programs. For some reason, a .MSI file that's perfectly happy to install on a double click generates:

This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.

when I invoke it with MSIEXEC in the following manner:

<ItemGroup>
  <_SampleMsi Include="$(_ArtifactsPathAcceptanceSamples)\**\*.msi" />
</ItemGroup>
<Exec Command="$(WixDir)\smoke &quot;%(_SampleMsi.Identity)&quot;"/>
<!--Guarantee precondition even if cleanup didn't work-->
<Exec Command="msiexec -passive -norestart -x &quot;%(_SampleMsi.Identity)&quot;" IgnoreExitCode="true"  />
<Exec Command="msiexec -norestart -i &quot;%(_SampleMsi.Identity)&quot;"  />
<!--Uninstall of every sample should also always work-->
<Exec Command="msiexec -passive -norestart -x &quot;%(_SampleMsi.Identity)&quot;" />

The same problem also happens when I try to uninstall based on the Product Id GUID:-

msiexec -passive -norestart -x FC7445BB-7E1D-4E36-A42A-CFA56263E453

What gives?

Best Answer

Just removed .\ prep-ending the filename and it worked.

Related Topic