If anyone wants to clean it up by all means
<code>#Flash Active X Vars $testflashX = Test-path "HKLM:\Software\Classes\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}" $flashxregkey1 = 'HKLM:\Software\Macromedia\FlashPlayer\SafeVersions' [string]$flashxregkey2 = '21.0' #test active X install $activex = (Get-ItemProperty $flashxregkey1).$flashxregkey2 If ($testflashX -eq $true) { if ($activex -le 213) { Execute-MSI -action install -path "$dirfiles\install_flash_player_21_active_x.msi" -Parameters "/qn" If ($psArchitecture -eq "x64") { copy-file -Path "$dirfiles\mms.cfg" -destination "$envWinDir\SysWow64\Macromed\Flash" } ElseIf ($psArchitecture -eq "x86") { copy-file -Path "$dirfiles\mms.cfg" -destination "$envWinDir\System32\Macromed\Flash"} } } write-log -message "Key found for active X found = $testflashX" write-log -message "activex = $activex" #flash Plugin Vars $testflashplug = Test-path "HKLM:\Software\Macromedia\FlashPlayerPlugin" $flashplug1 = "HKLM:\Software\Macromedia\FlashPlayerPlugin" $plugin = (Get-ItemProperty $flashplug1).version #test plugin version If ($testflashplug -eq $true) {If($plugin -ne "21.0.0.213") { Execute-MSI -action install -path "$dirfiles\install_flash_player_21_plugin.msi" -Parameters "/qn" If ($psArchitecture -eq "x64") { copy-file -Path "$dirfiles\mms.cfg" -destination "$envWinDir\SysWow64\Macromed\Flash" } ElseIf ($psArchitecture -eq "x86") { copy-file -Path "$dirfiles\mms.cfg" -destination "$envWinDir\System32\Macromed\Flash"} } } Write-log -message "test flash plug in path was $testflashplug" write-log -message "Plugin version detected = $plugin"</code>