Wednesday, 26 October 2011

Reader 9.4.6 Deployment Error: 1646



Error 1646

During Adobe Reader patch deployment in the client domain of around 6000+ machines, application was unable to upgrade to latest version and failing with the Error – 1646 as per the SCCM reports for around 200 machines. In report Error – 1646 won’t provide the detailed information why the application failed or reference to source of error.
Reason for the Error:
Even though deployment was successful since considering the percentage of success there is a need to fix the issues so that in future we should not face the similar kind of issues.
During earlier version deployment of Adobe reader application was leaving behind the entries of old versions (registry entries as below) as a reason it will display in ADD-Remove Programs of 2 versions entries.
FIG -1
clip_image004
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\ Products\68AB67CA7DA73301B7449A0400000010\Patches\68AB67CA7DA700005205A7C804009054
Uninstallable=0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\68AB67CA7DA73301B7449A0400000010\Patches\68AB67CA7DA700005205A7C804009034 "
Uninstallable=0

Possibility of such a errors could be during installation of application if user is using reader application then it would locked the registries of older version and would have been not removed.
Solution:
While upgrading to latest version of adobe reader (9.4.6) it was failing to upgrade as registries are (as above) string value Uninstallable=0 of old version entries (i.e. 9.4.5and 9.4.3) which won’t allow for un-installation of the application.By enabling the registry value to Uninstallable=1 enable to uninstall of older version and upgrade to latest versions,
To address this change wrote a script to change the registries and run the advertisement on failed machines which gave successful results.
Adobe Reader 9.4.6 registry modification script
'==========================================================
' ' COMMENT:
' Script will check value name of the string “Uninstallable” oIf value is equal to ZERO(Uninstallable=0)
' then script should modify it to 1
'
'
'
'==========================================================
public Const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\68AB67CA7DA73301B7449A0400000010\Patches\68AB67CA7DA700005205A7C804009034\Uninstallable"
x=readreg (strkeypath)
‘msgbox "Value 1# "&x
'******* if regkey value is 0 then key will set to 1 **********************************
if x=0 then
strKeyPath1 = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\68AB67CA7DA73301B7449A0400000010\Patches\68AB67CA7DA700005205A7C804009034"
regkey="Uninstallable"
strvalue ="1"
addreg strkeyPath1, regkey, strvalue, 4
end if
x=readreg (strkeypath)
‘msgbox "2 "&x
if x=1 then
x=0
else
x=6
end if
‘msgbox x
wscript.quit(x)
'********************* Adding registry key ******************************
function addreg(strKeyPath, regkey, strValue, regtype )
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
‘msgbox "strkeypath "&strkeypath
‘msgbox regkey
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strkeypath,regkey, strValue
end function
'***************** Read registry key ********************
function readreg (strRegistryKey )
Dim WSHShell, value
On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
‘msgbox " strRegistryKey " &strRegistryKey
value = WSHShell.RegRead( strRegistryKey )
‘msgbox "value " &value
if err.number <> 0 then
readreg= "6"
else
readreg=value
end if
set WSHShell = nothing
end function





















































































No comments:

Post a Comment