Using Package

This topic contains 6 replies, has 4 voices, and was last updated by Profile photo of Tore Groneng Tore Groneng 3 years ago.

  • Author
    Posts
  • #14629
    Profile photo of Sirirat Kongdee
    Sirirat Kongdee
    Participant

    This is my first DSC project and the first requirement is to install WSE 2.0 SP3 and WSE 3.0.

    1. DSC doesn't really need ProductID to install even though it complains? How can I find out the ProductId? I think it might be important for uninstalling?

    PowerShell provider MSFT_PackageResource failed to execute Set-TargetResource functionality with error message: Package from c:\PreReq\Microsoft WSE 2.0 SP3 Runtime.msi was installed, but the specified ProductId and/or Name does not match package details

    2. Both product doesn't show up in Programs and Features. What did I do wrong?

  • #14630
    Profile photo of Don Jones
    Don Jones
    Keymaster

    1. The ProductID is how DSC identifies if the package is installed or not, at least in the current iteration. You can look at the Win32_Product WMI class to get product IDs of installed products. It's just the Windows Installer product ID.

    2. No idea. Bit tough for me to guess with just the information you've provided.

  • #14631
    Profile photo of Sirirat Kongdee
    Sirirat Kongdee
    Participant

    Thank you very much, Don for your help. This is how I set it. After running it, it said it installed. The folder are created in the right place. They just don't show up the Programs and Features. If I run the install manually, it even doesn't know like it is already installed.

    Package MSWSE2SP3
    {
    Ensure = "Present"
    Path = "c:\PreReq\Microsoft WSE 2.0 SP3 Runtime.msi"
    Name = "Microsoft WSE 2.0 SP3 Runtime.msi"
    ProductId="F3CA9611-CD42-4562-ADAB-A554CF8E17F1"
    }

    Package MSWSE2SP3
    {
    Ensure = "Present"
    Path = "c:\PreReq\Microsoft WSE 2.0 SP3 Runtime.msi"
    Name = "Microsoft WSE 2.0 SP3 Runtime.msi"
    ProductId="F3CA9611-CD42-4562-ADAB-A554CF8E17F1"
    }

    Thank you!

  • #14682
    Profile photo of Stein Petersen
    Stein Petersen
    Participant

    Hi Sirriat,

    Is this the configuration you use?
    The example shows duplicate entries for the Packges.

  • #14703
    Profile photo of Tore Groneng
    Tore Groneng
    Participant

    hi,

    As Stein pointed out, both packages have the same path/msi file. what happens if you run the configuration with the -wait and -verbose switch set? You are also missing the argument parameter in you configuration. Could be you don't need it, however most msi-packages need the /q or /qn switch set to install "silently".

    Regarding the product name and code, you could use my function posted here

    Cheers

    Tore

  • #14810
    Profile photo of Tore Groneng
    Tore Groneng
    Participant

    hi,

    You do not need any arguments with that msi to get it to install silently?

    /Tore

  • #14741
    Profile photo of Sirirat Kongdee
    Sirirat Kongdee
    Participant

    Sorry, I copied the wrong one. Let me do this again. 😉

    Package MSWSE3
    {
    Ensure = "Present"
    Path = "c:\PreReq\Microsoft WSE 3.0 Runtime.msi"
    Name = "Microsoft WSE 3.0 Runtime.msi"
    ProductId="E3E71D07-CD27-46CB-8448-16D4FB29AA13"
    }

    Package MSWSE2SP3
    {
    Ensure = "Present"
    Path = "c:\PreReq\Microsoft WSE 2.0 SP3 Runtime.msi"
    Name = "Microsoft WSE 2.0 SP3 Runtime.msi"
    ProductId="F3CA9611-CD42-4562-ADAB-A554CF8E17F1"
    }

    Then I use the command Start-DscConfiguration -Wait -Verbose -Path .\FileResourceDemo

    They show up in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall. The dlls are registered in GAC. They do not appear in Programs and Features.

    Thank you Tore for the script.

You must be logged in to reply to this topic.