Error trying to install WAIK with Package

This topic contains 7 replies, has 2 voices, and was last updated by Profile photo of crashrebootrepeat crashrebootrepeat 1 year, 11 months ago.

  • Author
    Posts
  • #24177
    Profile photo of crashrebootrepeat
    crashrebootrepeat
    Participant

    Hi – I am trying to install the Windows Automated Installation Kit MSI with the Package Resource and I am receiving an error which I can not seem to resolve no matter how I reconfigure it. If I run this installer manually it works.

    My code and error are below

    Package WINDOWS-AUTOMATED-INSTALLATION-KIT{
    Name = 'WAIK'
    ProductId = '31E8F586-4EF7-4500-844D-BA8756474FF1'
    Ensure = 'Present'
    Path = 'C:\DSC\Software\WAIK\wAIKAMD64.msi'
    Arguments = '/s/v/qn'
    }

    PowerShell DSC resource MSFT_PackageResource failed to execute Set-TargetResource functionality with error
    message: The specified Name (WAIK) and IdentifyingNumber () do not match Name (Windows Automated
    Installation Kit) and IdentifyingNumber ({31E8F586-4EF7-4500-844D-BA8756474FF1}) in the MSI file
    + CategoryInfo : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName : DC

    The SendConfigurationApply function did not succeed.
    + CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName : DC

  • #24178
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Try setting the Name property to a blank string, and leave ProductId as-is. That resource is a bit weird, having both of those properties marked as Mandatory, even though you're really supposed to use one or the other (ProductId for MSIs, and Name for everything else.)

  • #24179
    Profile photo of crashrebootrepeat
    crashrebootrepeat
    Participant

    Dave – That got me further it is running and has not generated an error yet but it seems to be taking forever. It has been sitting processing the install for several minutes and I can install it manually in less than a minute.

    Any ideas?

  • #24180
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Could be your arguments. They don't look like what I'd expect to see for an MSI. Try just deleting that Arguments property from your configuration altogether; the resource will automatically use "/quiet" for MSI packages anyway.

  • #24181
    Profile photo of crashrebootrepeat
    crashrebootrepeat
    Participant

    New Error

    PowerShell DSC resource MSFT_PackageResource failed to execute Set-TargetResource functionality with error message: The
    return code 1603 was not expected. Configuration is likely not correct
    + CategoryInfo : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName : DC

    The SendConfigurationApply function did not succeed.
    + CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName : DC

  • #24182
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Now you're getting into the annoying stuff. 1603 is "Fatal error during installation", and this is something that commonly rears its ugly head when trying to install packages as LocalSystem.

    First things first, add a LogPath to your Package resource. The contents of that log will help with troubleshooting. Here's an example of a similar failure in another installer: https://powershell.org/forums/topic/using-package-resource-to-install-node-returns-1603/

  • #24183
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Alternatively, try using the RunAsCredential property on the Package resource to run the installer as something other than System. (I don't recall whether this existed in the WMF 4.0 version of DSC. I see it on my system, but I'm running the latest WMF 5.0 preview. If it's not there, you can use the cPackage resource from https://github.com/PowerShellOrg/cPSDesiredStateConfiguration .)

  • #24184
    Profile photo of crashrebootrepeat
    crashrebootrepeat
    Participant

    Here is the log – I notice a couple things right off the bat

    1.) It says "Windows Automated Installation Kit — This MSI can only be installed with full UI" – I am not sure if that means this application needs to be installed with a different msi or if I can't install it unattended as part of DSC
    2.) It is asking for .net which I know it needs. One off my first steps in my config is to install .net and I have verified by looking at the server manager that it is indeed installed

You must be logged in to reply to this topic.