Using DSC to deploy an EXE installer - Need to deploy new builds

Welcome Forums DSC (Desired State Configuration) Using DSC to deploy an EXE installer - Need to deploy new builds

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

 
Participant
4 years, 6 months ago.

  • Author
    Posts
  • #16954

    Participant
    Points: 0
    Rank: Member

    So after spending a few days with learning the basics of DSC I have a setup where my MOF is deploying an EXE installer for some software I am testing to a VM. A fresh install of this EXE works fine. What I would like to do is also use DSC to push new builds of this EXE installer to the VM and run it so that it self upgrades, but I am not sure how to achieve that. Running the MOF again using the new build of the EXE doesn't run the installer, because the LCM sees that the Product Name already exists.

    My code to create the MOF is very simple:

    Package MyProduct
            {
            Ensure="Present"
            Path="C:\Temp\Installers\Net\Product.exe"
            Name="Product"
            ProductID=""
            DependsOn = '[Package]CrystalReports'
            }
    
  • #16955

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

    You're probably going to have to custom-build this in a Script resource or something. The Package resource wasn't really designed with EXEs in mind; the "test" function has no way of testing to see if a particular version is installed or not. I'm not entirely sure DSC is going to prove a good long-term way of managing software deployments, at least not using current Setup routines.

  • #16956

    Member
    Points: 0
    Rank: Member

    Doesn't look like the built-in Package resource supports this, but it also look like it shouldn't be too difficult to make a community modification of it (cPackage) which adds some optional Version behavior.

  • #16957

    Participant
    Points: 0
    Rank: Member

    Would it be easier if I extracted the MSI from the EXE?

    Thanks for the help, I sincerely apprecaite it!!

  • #16958

    Member
    Points: 0
    Rank: Member

    Only if the new versions of the MSI have a different product ID. Right now, that's the only way the Package resource identifies currently-installed software other than "Name".

  • #16959

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

    Yeah, to be clear: The native Package resource doesn't presently care about versions at all. It's "is this software installed or not." It isn't designed to be a full-fledged software deployment mechanism a la SCCM or GPO. At least, not currently. Who knows what'll happen in the future.

  • #16960

    Participant
    Points: 0
    Rank: Member

    Got it. Thanks again for the assistance!

The topic ‘Using DSC to deploy an EXE installer - Need to deploy new builds’ is closed to new replies.