Google Earth Uninstall
We are planning to remove Google Earth from machines running on our network, but the problem I encountered is there are several versions running. Is there a global uninstall string we could use instead of having to build an uninstall for each version?
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
gwir
10 years ago
Posted by:
airwolf
13 years ago
Posted by:
dchristian
13 years ago
What i do is run a report to list all the uninstall strings for every version.
Once you have all the strings you can run ALL of them on a machine.
If it has that version, great its uninstalled. If not, no harm no foul.
Once you have all the strings you can run ALL of them on a machine.
If it has that version, great its uninstalled. If not, no harm no foul.
SELECT DISPLAY_NAME,
DISPLAY_VERSION,
Concat(REPLACE(UNINSTALL_STRING, '/I', '/X'), ' /QN') AS STRING
FROM SOFTWARE
WHERE DISPLAY_NAME LIKE '%Google Earth%'
ORDER BY DISPLAY_NAME,
DISPLAY_VERSION
Posted by:
cblake
13 years ago
As airwolf suggests- A batch file containing all possible strings served me well. Might be useful to block the process as well.
Posted by:
rmeyer
13 years ago
I created a vbscript to do that =)
It checks for everything in "add remove applications" that contains "iTunes" in this case then do a silent uninstall, you can make a script that runs this if they have the software installed, or make a Software that contains all versions to uninstall =)
---------------------
On Error Resume Next
'**********************************************************************
const AppName = "iTunes"
'**********************************************************************
const HKEY_LOCAL_MACHINE = &H80000002
Set WshShell = WScript.CreateObject("WScript.Shell")
'First, find the GUID
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
If InStr(InstalledAppName, AppName) > 0 then
RawGUID = ""
GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
If GUID<>"" then
' wscript.echo "Found matching GUID, removing..."
WshShell.Run "msiexec /x " & GUID & " /qn", 0, true
Exit For
End If
End If
-------------------------
It checks for everything in "add remove applications" that contains "iTunes" in this case then do a silent uninstall, you can make a script that runs this if they have the software installed, or make a Software that contains all versions to uninstall =)
---------------------
On Error Resume Next
'**********************************************************************
const AppName = "iTunes"
'**********************************************************************
const HKEY_LOCAL_MACHINE = &H80000002
Set WshShell = WScript.CreateObject("WScript.Shell")
'First, find the GUID
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
InstalledAppName = ""
InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
If InStr(InstalledAppName, AppName) > 0 then
RawGUID = ""
GUID = ""
RawGUID = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\UninstallString")
GUID = Mid(RawGUID, instr(RawGUID, "{"), 38)
If GUID<>"" then
' wscript.echo "Found matching GUID, removing..."
WshShell.Run "msiexec /x " & GUID & " /qn", 0, true
Exit For
End If
End If
-------------------------
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.