Using Package

This topic contains 6 replies, has 4 voices, and was last updated by

 
Participant
4 years, 7 months ago.

  • Author
    Posts
  • #14629

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    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

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 1
    Rank: Member

    Hi Sirriat,

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

  • #14703

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    hi,

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

    /Tore

  • #14741

    Participant
    Points: 0
    Rank: Member

    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.

The topic ‘Using Package’ is closed to new replies.