What are the MSI package GUIDs for earlier versions of Acrobat Reader?
more
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
dunnpy
12 years ago
Posted by:
rmeyer
12 years ago
if you like to uninstall Adobe readers no matter what version you can run this script :)
-------------------------------
'Remove Adobe Reader
'vbscript
On Error Resume Next
'**********************************************************************
const AppName = "Adobe Reader"
'**********************************************************************
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
Next
-----------------------------------------------
Be carefull tho!
If will look for everything in "add/remove programs" and uninstall it, so if you just type "Adobe" in the 'const AppName = "Adobe"' then it will install everything that contains Adobe in the name!
-------------------------------
'Remove Adobe Reader
'vbscript
On Error Resume Next
'**********************************************************************
const AppName = "Adobe Reader"
'**********************************************************************
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
Next
-----------------------------------------------
Be carefull tho!
If will look for everything in "add/remove programs" and uninstall it, so if you just type "Adobe" in the 'const AppName = "Adobe"' then it will install everything that contains Adobe in the name!