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

**URL:** https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804
**Category:** DSC
**Created:** [July 10, 2014, 1:37am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804 "2014-07-10T01:37:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@alex](https://forums.powershell.org/u/alex)
#### Post date: [July 10, 2014, 1:37am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/1 "2014-07-10T01:37:49Z")

</div>

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'
        }
```

---

<div class="post-metadata">

### Author: ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)
#### Post date: [July 10, 2014, 1:50am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/2 "2014-07-10T01:50:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)
#### Post date: [July 10, 2014, 2:05am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/3 "2014-07-10T02:05:50Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@alex](https://forums.powershell.org/u/alex)
#### Post date: [July 10, 2014, 2:09am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/4 "2014-07-10T02:09:16Z")

</div>

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

Thanks for the help, I sincerely apprecaite it!!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)
#### Post date: [July 10, 2014, 2:21am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/5 "2014-07-10T02:21:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)
#### Post date: [July 10, 2014, 2:24am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/6 "2014-07-10T02:24:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@alex](https://forums.powershell.org/u/alex)
#### Post date: [July 10, 2014, 2:32am UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/7 "2014-07-10T02:32:09Z")

</div>

Got it. Thanks again for the assistance!

---

<div class="post-metadata">

### Author: ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)
#### Post date: [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/using-dsc-to-deploy-an-exe-installer-need-to-deploy-new-builds/2804/8 "2024-05-16T21:17:35Z")

</div>


