Installing an exe with Powershell DSC Package resource gets return code 1619

Daniel over at the Powershell.org forums was able to figure this out for me.

The P4V InstallShield setup wrapper puts the MSI file into wrong path if you execute as LocalSystem.

I’ve managed to develop a Configuration that works, see below. The key is the /b switch here which puts the MSI file into a defined location. I’ve added ALLUSERS=1 to get the shortcuts visible to all users and REBOOT=ReallySuppress to avoid a sudden restart (which will happen otherwise).

Configuration PerforceMachine
{
    Package P4V
    {
        Ensure = "Present"
        Name = "Perforce Visual Components"
        Path = "C:\My\p4vinst64.exe"
        ProductId = ''
        Arguments = '/b"C:\Windows\Temp\PerforceClient" /S /V"/qn ALLUSERS=1 REBOOT=ReallySuppress"' # args for silent mode
    }
}