WshShell.Run "msiexec.exe /i AdbeRdr812_en_US.msi TRANSFORMS=""AcroRdr.mst"" /qn"
'Remove all acrobat Reader and install acrobat reader 9.1.0
'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
' Found matching GUID, removing...
WshShell.Run "msiexec /x " & GUID & " /q"
Exit For
End If
End If
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "msiexec.exe /i AcroRead.msi TRANSFORMS=""AcroRead.mst"" /qn"
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:" & "!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from Cim_Datafile where Name = " _
& "'C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\plug_ins\\ia32.api'")
For Each objFile in colFiles
errResult = objFile.Rename("C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\plug_ins\\ia32.txt")
Wscript.Echo errResult
Here are some links regarding installing acrobat reader...
http://www.appdeploy.com/packages/detail.asp?id=915
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb403246
Open in new window