Author Posts

July 10, 2014 at 7:07 am

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
        DependsOn = '[Package]CrystalReports'

July 10, 2014 at 7:20 am

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.

July 10, 2014 at 7:35 am

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.

July 10, 2014 at 7:39 am

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

Thanks for the help, I sincerely apprecaite it!!

July 10, 2014 at 7:51 am

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".

July 10, 2014 at 7:54 am

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.

July 10, 2014 at 8:02 am

Got it. Thanks again for the assistance!