Problem with silent install MSI using package resource

Using ORCA/InstEd I’ve identified a few Public Keys to overwrite during a MSI install.

When running the DSC job below the MSI installer starts but sticks on something and never completes. The installer is ran as SYSTEM which may be the problem.
I’m aware of the Credentials=‘’ definition but had little luck getting it to work.
I am running PS 4.0 on windows server 2012 for testing.

Configuration SetupInstall { param ( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String] $PackagePath )
Node $AllNodes.where{ $_.Role.Contains("Development") }.NodeName
{

    Package InstallApplicationExample
    {
        DependsOn = "[File]ApplicationExample" # I left the file out of the code here
        Ensure = "Present"
        Name = "ApplicationExample Ver x.x.x.x"
        Path = Join-Path $Node.Installs "ApplicationExample.msi"

        ProductId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
        #Arguments = '/b "C:\Windows\Temp\ApplicationExample" /S /V"/qn ALLUSERS=1 REBOOT=ReallySuppress"'
        #Arguments = '/b "C:\Windows\Temp\ApplicationExample" /S /V /qn ALLUSERS=1 REBOOT=ReallySuppress KEYONE="D:\Vendor Program Files\" KEYTWO="FILE NAME=\\Server\db.udl"'
        Arguments = $("/qn KEYONE=`"{0}`" KEYTWO=`"{1}`" ALLUSERS=1 REBOOT=ReallySuppress" -f $key1, $key2)
        LogPath = Join-Path $Node.TempFolder "ApplicationExample.txt"
    }
}

}
SetupInstall -ConfigurationData “configData.psd1” -PackagePath “\SERVER\REPO”

Start-DscConfiguration -Path .\SetupInstall -Verbose -Wait -Force

However, the installer works perfectly when running with msiexec from commandline.

msiexec /I "ApplicationExample.msi" /qb /L*V ApplicationExample.txt KEYONE="D:\Vendor Program Files\" KEYTWO="FILE NAME=\\Server\db.udl"

Any idea how to troubleshoot how to add these parameters or troubleshoot installing the MSI. It seems pointless to create a script block for ever program that should be installed when given the PACKAGE resource.

Note: The arguments used were found in the post https://powershell.org/forums/topic/installing-an-exe-with-powershell-dsc-package-resource-gets-return-code-1619/

If the problem you’re having is due to running as LocalSystem, then you can try out the xPackage resource from the DSC resource kit. It has a RunAsCredential property that you can assign. (This was written before WMF 5 added the PsDscRunAsCredential common property that you can use on any DSC resource, and has the added benefit of being compatible with WMF 4.0 as well.)

I’m going to pull the DSC resource kit and learn the ropes to test this out. On a side note is there any benefit to upgrading the WMF 5 instead of using the DSC resource kit?

Oh, definitely. People from Microsoft (including Jeffrey Snover) tend to refer to WMF 4 as “DSC 0.9”. It got things going, but had a lot of pain points. WMF 5 includes many enhancements to DSC.

That said, you can’t download it right now, because the WMF 5 installer was wiping out the PSModulePath environment variable. Microsoft pulled it back a couple weeks ago, and should be uploading a fixed version asap. In the meantime, you can still play with WMF 5’s final release on Windows 10, because it gets pushed out via Windows Update instead of an installer that you have to download and run.

Thanks for the suggestion David. I installed the xPackage and changed package to xPackage. It worked straight out of the box without using any of the credentials.

Hello All,

I am trying to install BizTalk2013R2 by using Powershell DSC to a different destination Node from a source Node with the following code. But looks like not working.

When I am giving the below product id, after running the code, it gives warning as “The package Microsoft BizTalk Server 2013 R2 is already installed”. This is because In my local machine BT 2013r2 is installed

Please guide me on this how can I get success on deploying it.

Configuration InstallB
{
Node DestinationNode
{
WindowsFeature NetFramework35Core
{
Name = “NET-Framework-Core”
Ensure = “Present”
Source = $WinSources
}
WindowsFeature NetFramework45Core
{
Name = “NET-Framework-45-Core”
Ensure = “Present”
Source = $WinSources
}

Package InstallBT
{
Ensure = “Present”
Name = “Microsoft BizTalk Server 2013 R3”
Path = “X:\Installs\BizTalk2013R2\Developer\BizTalk Server\Setup.exe”
ProductId = ‘’
Arguments = ‘/b"C:\Windows\Temp\PerforceClient" /S /V"/qn ALLUSERS=1 REBOOT=ReallySuppress"’ # args for silent mode
}

	Package CabFile
	 {
	 	 Ensure = "Present"
         Name = "CAB file for BizTalk 2013 R2"
         Path = "X:\Installs\CAB BizTalk2013R2\BtsRedistW2K12EN64.cab"
		 ProductId = ""
	}
	
	 Package ConfigurationFile
	 {
	 	 Ensure = "Present"
         Name = "Configuration File for BizTalk 2013 R2"
         Path = "X:\Installs\BizTalk2013R2 Config\BizTalkConfig.xml"
		 ProductId = ""
	 }

}
}

InstallB
Start-DscConfiguration –Wait –Verbose –Path .\InstallB -Force