# Uninstall (add/remove programs) action?

**URL:** https://www.finalbuilder.com/forums/t/uninstall-add-remove-programs-action/465
**Category:** Discussion
**Created:** [May 11, 2007, 5:51am UTC](https://www.finalbuilder.com/forums/t/uninstall-add-remove-programs-action/465 "2007-05-11T05:51:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![matth](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/f475e1/32.png) [@matth](https://www.finalbuilder.com/forums/u/matth)
#### Post date: [May 11, 2007, 5:51am UTC](https://www.finalbuilder.com/forums/t/uninstall-add-remove-programs-action/465/1 "2007-05-11T05:51:06Z")

</div>

I have a build for an application framework.&nbsp; Once the build completes successfully I wanto to uninstall the previous version then install the new version . . . automagically!&nbsp;

I can't find any actions for "Add/Remove" or "Uninstall".&nbsp; Does anyone know of a way to do this?&nbsp;

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [May 14, 2007, 2:43am UTC](https://www.finalbuilder.com/forums/t/uninstall-add-remove-programs-action/465/2 "2007-05-14T02:43:45Z")

</div>

Hi Matt,  
  
You should be able to install/uninstall .msi files by writing some script code using WMI.   
  
[Automise have these actions built in though: Windows Installer - Install, Windows Installer - Uninstall, Windows Installer - Reinstall.]  
  
hth.  
.t8

---

<div class="post-metadata">

### Author: ![stevage](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@stevage](https://www.finalbuilder.com/forums/u/stevage)
#### Post date: [May 15, 2007, 3:34am UTC](https://www.finalbuilder.com/forums/t/uninstall-add-remove-programs-action/465/3 "2007-05-15T03:34:44Z")

</div>

It’s actually really easy, use msiexec.exe:  
  
msiexec /Option (Required Parameter) [Optional Parameter]  
  
Install Options  
(/package | /i) (Product.msi)  
Installs or configures a product  
/a (Product.msi)  
Administrative install - Installs a product on the network  
/j(u|m) (Product.msi\> [/t (Transform List)] [/g (Language ID)]  
Advertises a product - m to all users, u to current user  
(/uninstall | /x) (Product.msi | ProductCode)  
Uninstalls the product  
  
Steve
