Adobe Flash Player ActiveX

Views: 4.8k  |  Created: 09/11/2009

Average Rating: 0
Flash Player ActiveX has 2 inventory records, 6 Questions, 2 Blogs and 5 links. Please help add to this by sharing more!

Deployment Tips (1)

Most Common Setup Type
Not Determined
Average Package Difficulty Rating
Rated 2 / 5 (Somewhat Easy) based on 1 ratings
Most Commonly Reported Deployment Method
Not Determined
Our Organization was having very high failure rates for the deployment Adobe Flash, both the ActiveX and Plugin. The event viewer error entry details that it cant find the source of the previously installed versions of Flash player.
The script below will clean up the registry to enable the newer version to install. Run the vbs below then run the installers for adobe flash.
The code below will be relevant from previous flash versions (v 12) on-wards until when adobe changes the upgrade code.

'The following code will remove Adobe Flash specific registries from that are not relevant to the currently installed version.
' "HKLM\SOFTWARE\Classes\Installer\Products\"
' "HKLM\SOFTWARE\Classes\Installer\Features\"
' "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\"
'Logic : Getlist of GUID based on upgradecode. For each upgrade code, check if its installed, if not installed remove from registry

strHklmSwClsInstProd= "SOFTWARE\Classes\Installer\Products\"
strHklmSwClsInstFeat= "SOFTWARE\Classes\Installer\Features\"
strHklmWowUninstall= "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\" 'to find currently installed version

'the packed upgradecode for flash player activeX is 70836424B0797524CB59C543D816FDC1
strKeyPathActivX = "SOFTWARE\Classes\Installer\UpgradeCodes\70836424B0797524CB59C543D816FDC1"

'the packed upgradecode for flash player plugin is 95A1A58D25CD31D44954FEF373D9D45B
strKeyPathPlugIn = "SOFTWARE\Classes\Installer\UpgradeCodes\95A1A58D25CD31D44954FEF373D9D45B"

Const boolDbg=True 'True to turn on output
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_SZ = 1
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7

strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

set oReg = Nothing

Function cleanFlashRegistries(strFlashUpgradeCode)
	write "Upgrade Code :" & strFlashUpgradeCode
	intResultEnumUpgradCode = -1
	intResultEnumProdCode = -1
	set arrValueNames = Nothing
	intResultEnumUpgradCode = oReg.EnumValues(HKEY_LOCAL_MACHINE, strFlashUpgradeCode, arrValueNames, arrValueTypes)

	if (intResultEnumUpgradCode=0) AND IsArrayDimmed(arrValueNames) then 'successfully executed oReg.EnumValues
		For i=0 To UBound(arrValueNames)
			write "Value Name: " & arrValueNames(i)
			write"GUID: " & strGUIDfromPackgedGUID(arrValueNames(i))
			'Logic to find currently installed version ->
			intResultEnumProdCode= oReg.EnumValues(HKEY_LOCAL_MACHINE, strHklmWowUninstall & strGUIDfromPackgedGUID(arrValueNames(i)), arrValueNamesUninstallAx, arrValueTypesUninstallAx)
			if intResultEnumProdCode= 0 then 'found
				write "found in uninstall" ' so its currently installed
				'nuke the codes from the registry
				'Logic to delete the not currently installed verison ->
				write "Deleting the following"
				write strHklmSwClsInstProd & arrValueNames(i)
				DeleteSubkeys HKEY_LOCAL_MACHINE, strHklmSwClsInstProd & arrValueNames(i)
				write strHklmSwClsInstFeat & arrValueNames(i)
				DeleteSubkeys HKEY_LOCAL_MACHINE, strHklmSwClsInstProd & arrValueNames(i)
				write strFlashUpgradeCode & ":" & arrValueNames(i)
				oReg.DeleteValue HKEY_LOCAL_MACHINE,strFlashUpgradeCode,arrValueNames(i)
			End if
			write " "
		write "no entires found"
	End If
End Function

'input : [string] Packed Guid
'output: [string] GUID with Curley Brace {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Function strGUIDfromPackgedGUID(strPackedGUID)
	dim str18,str24,str34,str42,str52,str62,str72,str82,str92,str102,str112
	strGUIDfromPackgedGUID="{" & str18 & "-" & str24 & "-" & str34 & "-" & str42 & str52 & "-" & str62 & str72 & str82 & str92 & str102 & str112 & "}"
End Function

'script from the scripting guys site @ microsoft devleoper.
Sub DeleteSubkeys(HKEY_LOCAL_MACHINE, strKeyPath) 
    oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys 

    If IsArray(arrSubkeys) Then 
        For Each strSubkey In arrSubkeys 
            DeleteSubkeys HKEY_LOCAL_MACHINE, strKeyPath & "\" & strSubkey 
    End If 
    oReg.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath 
End Sub

Function write(strIn)
	If boolDbg Then
		Wscript.echo strIn
	end if
End Function

'Below code from http://wiki.mcneel.com/developer/scriptsamples/emptyarray
Function IsArrayDimmed(arr)
   IsArrayDimmed = False
   If IsArray(arr) Then
     On Error Resume Next
     Dim ub : ub = UBound(arr)
     If (Err.Number = 0) And (ub >= 0) Then IsArrayDimmed = True
   End If  
 End Function
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: Somewhat Easy
Platform(s): Windows
Please log in to comment

Inventory Records (2)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.

Flash Player ActiveX


Uninstall String


Questions & Answers (6)

Questions & Answers related to Adobe Flash Player ActiveX

Blogs (2)

Blog posts related to Adobe Flash Player ActiveX

Reviews (0)

Reviews related to Adobe Flash Player ActiveX