Changes

Jump to: navigation, search

Java

698 bytes added, 11:14, 17 August 2010
Java Uninstall Method
msi.ConfigureProduct(products.Item(i), 0, 2 /* INSTALLSTATE_ABSENT */);
</source>
 
And here is a VBS equivalent
 
<source lang="javascript">
 
Set msi = CreateObject("WindowsInstaller.Installer")
Set re = new regexp
Const msiInstallStateAbsent = 2
 
Dim ProductIds(2)
re.pattern="{(" & _
"7148F0A8-6813-11D6-A77B-00B0D0142" & _
"|3248F0A8-6813-11D6-A77B-00B0D01[56]" & _
"|4A03706F-666A-4037-7777-5F2748764D10" & _
")}"
 
msi.UILevel = 2
 
For Each msipackage In msi.Products
info = msipackage & " = " & msi.ProductInfo(msipackage, "ProductName")
WScript.Echo(Info)
Next
 
For Each msipackage In msi.Products
if re.test(msipackage) Then
WScript.Echo("Uninstalling " +msipackage)
msi.ConfigureProduct msipackage, 0, msiInstallStateAbsent
End If
Next
</source>
 
See also [[Sun Java]]
Anonymous user

Navigation menu