# ===================================================================================================
# Installation
# ===================================================================================================

# Supersedence Old Versions
 If ((SF-Supersedence "*Adobe_Flash_Player_*" -Cleanup) -eq $True) 
 {
    SF-Run "%_PkgSource%\Setup\uninstall_flash_player.exe" "-uninstall" -NoErrors -Wait
 }

# Install Internet Explorer/ActiveX (not for Windows 8 or higher)
 If ([decimal](SF-Variables "%_OSVersionCurrent%") -lt 6.3) {
    SF-MSIInstall "%_PkgSource%\Setup\install_flash_player_32_active_x.msi" "/qn /norestart" -NoErrors -Log
 }

# Install Firefox- und Netscape-Plug-in
 SF-MSIInstall "%_PkgSource%\Setup\install_flash_player_32_plugin.msi" "/qn /norestart" -Log

# Install Opera- und Chromium-basierte
 SF-MSIInstall "%_PkgSource%\Setup\install_flash_player_32_ppapi.msi" "/qn /norestart" -Log

# Remove Adobe Flash Player Update-Service
 SF-Service "AdobeFlashPlayerUpdateSvc" -Delete

# Remove Updater Schedule Task
 SF-Run "%_WindowsSystem64%\SchTasks.exe" "/Delete /TN ""Adobe Flash Player NPAPI Notifier"" /F" -Wait -NoErrors
 SF-Run "%_WindowsSystem64%\SchTasks.exe" "/Delete /TN ""Adobe Flash Player PPAPI Notifier"" /F" -Wait -NoErrors
 SF-Run "%_WindowsSystem64%\SchTasks.exe" "/Delete /TN ""Adobe Flash Player Updater"" /F" -Wait -NoErrors
 
# Remove Update Function
 SF-Register32 'HKey_Local_Machine' 'SOFTWARE\Macromedia\FlashPlayer' 'UpdateAttempts' '{nil}' 'REG_DWORD'
 SF-Register32 'HKey_Local_Machine' 'SOFTWARE\Macromedia\FlashPlayer' 'LastUpdateCheck' '{nil}' 'REG_DWORD'
 SF-Register32 'HKey_Local_Machine' 'SOFTWARE\Macromedia\FlashPlayer' 'CheckFrequency' '{nil}' 'REG_DWORD' 

# Copy Configfile
 SF-Copy "%_PkgSource%\Setup\mms.cfg" "%_WindowsSystem32%\Macromed\Flash\mms.cfg" -Changed
 SF-Copy "%_PkgSource%\Setup\mms.cfg" "%_WindowsSystem64%\Macromed\Flash\mms.cfg" -Changed -x64

# ===================================================================================================
# END
# ===================================================================================================