Windows Installer

Con la utilidad msiexec podemos instalar o desintalar paquetes desde la consola

Instalación

MSIEXEC /q /i XYZ.MSI Windows Installer command to silently install any MSI package

Desinstalar

MSIEXEC /q /x {package id} Windows Installer command to silently remove any MSI installation

Para saber la cadena del programa a desinstalar hay que ir a My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\userdata\s-1-5-18\Products\xxxxxxxx

Ejemplo de desinstalación mediante script de las versiones antiguas de java

'Thanks to Matthew Hudson to share the script code.
 
Set objWshShell = WScript.CreateObject("WScript.Shell")
 
On Error Resume Next
' Java(TM) 6 Update 7 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160070} /qn", 1, True
 
' Java(TM) 6 Update 2 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160020} /qn", 1, True
 
' Java(TM) 6 Update 1 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160010} /qn", 1, True
 
' Java(TM) 6 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0160000} /qn", 1, True
 
' J2SE Runtime Environment 5.0 Update 11 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150110} /qn", 1, True
 
' J2SE Runtime Environment 5.0 Update 10 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150100} /qn", 1, True
 
' J2SE Runtime Environment 5.0 Update 9 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150090} /qn", 1, True
 
' J2SE Runtime Environment 5.0 Update 6 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150060} /qn", 1, True
 
' J2SE Runtime Environment 5.0 Update 4 removal.
objWshShell.Run "msiexec /x {3248F0A8-6813-11D6-A77B-00B0D0150040} /qn", 1, True
 
wscript.quit 

Software para crear msi

conversor exe a MSI

Referencias