Changes

LibreOffice

3,018 bytes added, 02:44, 11 April 2017
Add code to uninstall OpenOffice.org and all versions and languages of LibreOffice
== Dual Installation with OpenOffice ==
LibreOffice does not replace an already installed OpenOffice (though LibreOffice 3.3 beta did), so you may like to remove OpenOffice before installing LibreOffice. Create an empty text file called OpenOfficeUninstall.vbs (or whatever you prefer), enter the following using Notepad: <source lang="dos"> Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_USERS = &H80000003 Set Reg = GetObject("winMgMts:StdRegProv") iRet = Reg.EnumKey(HKEY_USERS, "S-1-5-19", AKeys) If iRet <> 0 Then Dim UAC : Set UAC = CreateObject("Shell.Application") UAC.ShellExecute WScript.FullName, Chr(34) & WScript.ScriptFullName & Chr(34), "", "runas", 1 WScript.Quit End If Set WI = CreateObject("WindowsInstaller.Installer") Dim WshShell : Set WshShell = CreateObject("WScript.Shell") ' https://msdn.microsoft.com/en-us/library/windows/desktop/aa369487(v=vs.85).aspx Const msiUILevelBasic = 3 Const msiUILevelNone = 2 Const msiUILevelHideCancel = 32 WI.UILevel = msiUILevelBasic Set Products = WI.Products For Each Product In Products On Error Resume Next Name = WI.ProductInfo(Product, "ProductName") If Left(Name, Len("OpenOffice.org")) = "OpenOffice.org" Then LocalPackage = WI.ProductInfo(Product, "LocalPackage") If Not IsEmpty(LocalPackage) Then WI.InstallProduct LocalPackage, "REMOVE=ALL" Else WshShell.Run "msiexec /qb! /uninstall " & Product, 0, True End If End If Next</source> Save, exit Notepad and run the script.
==LibreOffice==
https://wiki.documentfoundation.org/ReleasePlan
 
=== Remove LibreOffice and Help Pack ===
 
On a system with LibreOffice already installed, you can uninstall all LibreOffice versions and languages. Create an empty text file called LibreOfficeUninstall.vbs (or whatever you prefer), enter the following using Notepad:
 
<source lang="dos">
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Set Reg = GetObject("winMgMts:StdRegProv")
iRet = Reg.EnumKey(HKEY_USERS, "S-1-5-19", AKeys)
If iRet <> 0 Then
Dim UAC : Set UAC = CreateObject("Shell.Application")
UAC.ShellExecute WScript.FullName, Chr(34) & WScript.ScriptFullName & Chr(34), "", "runas", 1
WScript.Quit
End If
Set WI = CreateObject("WindowsInstaller.Installer")
Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
' https://msdn.microsoft.com/en-us/library/windows/desktop/aa369487(v=vs.85).aspx
Const msiUILevelBasic = 3
Const msiUILevelNone = 2
Const msiUILevelHideCancel = 32
WI.UILevel = msiUILevelBasic
Set Products = WI.Products
For Each Product In Products
On Error Resume Next
Name = WI.ProductInfo(Product, "ProductName")
If Left(Name, Len("LibreOffice")) = "LibreOffice" Then
LocalPackage = WI.ProductInfo(Product, "LocalPackage")
If Not IsEmpty(LocalPackage) Then
WI.InstallProduct LocalPackage, "REMOVE=ALL"
Else
WshShell.Run "msiexec /qb! /uninstall " & Product, 0, True
End If
End If
Next
</source>
 
Save, exit Notepad and run the script.
=== Uninstall Strings For All Languages ===