flash: Fix protected mode issues and invalid registry entires

test-ci
Daniel 4 years ago
parent 606d5c1e47
commit 8bb46337e1

@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Text;
namespace CleanFlashCommon { namespace CleanFlashCommon {
public class RegistryManager { public class RegistryManager {
@ -9,7 +10,7 @@ namespace CleanFlashCommon {
registryContents = "Windows Registry Editor Version 5.00\n\n" + SystemInfo.FillString(registryContents); registryContents = "Windows Registry Editor Version 5.00\n\n" + SystemInfo.FillString(registryContents);
string filename = Path.GetTempFileName(); string filename = Path.GetTempFileName();
File.WriteAllText(filename, registryContents); File.WriteAllText(filename, registryContents, Encoding.Unicode);
Directory.SetCurrentDirectory(Path.GetDirectoryName(filename)); Directory.SetCurrentDirectory(Path.GetDirectoryName(filename));

@ -21,7 +21,8 @@ namespace CleanFlashCommon {
{ "${FLASH_64_PATH}", flash64Path.Replace(@"\", @"\\") }, { "${FLASH_64_PATH}", flash64Path.Replace(@"\", @"\\") },
{ "${VERSION}", version }, { "${VERSION}", version },
{ "${VERSION_PATH}", versionPath }, { "${VERSION_PATH}", versionPath },
{ "${VERSION_COMMA}", versionComma } { "${VERSION_COMMA}", versionComma },
{ "${ARCH}", Environment.Is64BitOperatingSystem ? "64" : "32" }
}; };
public static string GetSystem32Path() { public static string GetSystem32Path() {

@ -15,7 +15,7 @@ namespace CleanFlashCommon {
"flashplayerapp", "flashplayer_sa", "flashplayer_sa_debug", "flashplayerapp", "flashplayer_sa", "flashplayer_sa_debug",
// Browsers that might be using Flash Player right now // Browsers that might be using Flash Player right now
"opera", "iexplore", "chrome", "chromium", "brave", "vivaldi", "basilisk", "msedge", "opera", "iexplore", "chrome", "chromium", "brave", "vivaldi", "basilisk", "msedge",
"seamonkey", "palemoon", "plugin-container" "seamonkey", "palemoon", "k-meleon", "plugin-container"
}; };
static Uninstaller() { static Uninstaller() {

@ -121,11 +121,11 @@ namespace CleanFlashInstaller {
if (flags.IsSet(InstallFlags.ACTIVEX)) { if (flags.IsSet(InstallFlags.ACTIVEX)) {
form.UpdateProgressLabel("Activating 32-bit Flash Player for Internet Explorer...", true); form.UpdateProgressLabel("Activating 32-bit Flash Player for Internet Explorer...", true);
RegisterActiveX(Path.Combine(flash32Path, string.Format("Flash_{0}.ocx", SystemInfo.GetVersionPath()))); RegisterActiveX(Path.Combine(flash32Path, string.Format("Flash32_{0}.ocx", SystemInfo.GetVersionPath())));
if (Environment.Is64BitOperatingSystem) { if (Environment.Is64BitOperatingSystem) {
form.UpdateProgressLabel("Activating 64-bit Flash Player for Internet Explorer...", true); form.UpdateProgressLabel("Activating 64-bit Flash Player for Internet Explorer...", true);
RegisterActiveX(Path.Combine(flash64Path, string.Format("Flash_{0}.ocx", SystemInfo.GetVersionPath()))); RegisterActiveX(Path.Combine(flash64Path, string.Format("Flash64_{0}.ocx", SystemInfo.GetVersionPath())));
} }
} }
} }

@ -104,7 +104,7 @@ namespace CleanFlashInstaller.Properties {
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPlugin] /// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPlugin]
///"isPartner"=dword:00000001 ///"isPartner"=dword:00000001
///"Version"="${VERSION}" ///"Version"="${VERSION}"
///"PlayerPath"="${FLASH_64_PATH}\\NPSWF_${VERSION_PATH}.dll" ///"PlayerPath"="${FLASH_64_PATH}\\NPSWF${ARCH}_${VERSION_PATH}.dll"
///"UninstallerPath"=- ///"UninstallerPath"=-
///"isScriptDebugger"=dword:00000000 ///"isScriptDebugger"=dword:00000000
///"isESR"=dword:00000000 ///"isESR"=dword:00000000
@ -115,7 +115,7 @@ namespace CleanFlashInstaller.Properties {
/// ///
///[HKEY_LOCAL_MACHINE\Software\MozillaPlugins\@adobe.com/FlashPlayer] ///[HKEY_LOCAL_MACHINE\Software\MozillaPlugins\@adobe.com/FlashPlayer]
///"Vendor"="Adobe" ///"Vendor"="Adobe"
///"ProductName"="Adobe® Flash® Player ${VERSION} P [rest of string was truncated]";. ///"ProductName"="Adobe® Flash® Player ${VER [rest of string was truncated]";.
/// </summary> /// </summary>
internal static string installNP { internal static string installNP {
get { get {
@ -203,7 +203,7 @@ namespace CleanFlashInstaller.Properties {
/// <summary> /// <summary>
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPepper] /// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPepper]
///&quot;UninstallerPath&quot;=- ///&quot;UninstallerPath&quot;=-
///&quot;PlayerPath&quot;=&quot;${FLASH_64_PATH}\\pepflashplayer_${VERSION_PATH}.dll&quot; ///&quot;PlayerPath&quot;=&quot;${FLASH_64_PATH}\\pepflashplayer${ARCH}_${VERSION_PATH}.dll&quot;
///&quot;isScriptDebugger&quot;=dword:00000000 ///&quot;isScriptDebugger&quot;=dword:00000000
///&quot;isESR&quot;=dword:00000000 ///&quot;isESR&quot;=dword:00000000
///&quot;isMSI&quot;=dword:00000000 ///&quot;isMSI&quot;=dword:00000000
@ -222,7 +222,7 @@ namespace CleanFlashInstaller.Properties {
/// <summary> /// <summary>
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerPepper] /// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerPepper]
///&quot;UninstallerPath&quot;=- ///&quot;UninstallerPath&quot;=-
///&quot;PlayerPath&quot;=&quot;${FLASH_32_PATH}\\pepflashplayer_${VERSION_PATH}.dll&quot; ///&quot;PlayerPath&quot;=&quot;${FLASH_32_PATH}\\pepflashplayer32_${VERSION_PATH}.dll&quot;
///&quot;isScriptDebugger&quot;=dword:00000000 ///&quot;isScriptDebugger&quot;=dword:00000000
///&quot;isESR&quot;=dword:00000000 ///&quot;isESR&quot;=dword:00000000
///&quot;isMSI&quot;=dword:00000000 ///&quot;isMSI&quot;=dword:00000000

@ -154,7 +154,7 @@
<value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPlugin] <value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPlugin]
"isPartner"=dword:00000001 "isPartner"=dword:00000001
"Version"="${VERSION}" "Version"="${VERSION}"
"PlayerPath"="${FLASH_64_PATH}\\NPSWF_${VERSION_PATH}.dll" "PlayerPath"="${FLASH_64_PATH}\\NPSWF${ARCH}_${VERSION_PATH}.dll"
"UninstallerPath"=- "UninstallerPath"=-
"isScriptDebugger"=dword:00000000 "isScriptDebugger"=dword:00000000
"isESR"=dword:00000000 "isESR"=dword:00000000
@ -166,7 +166,7 @@
[HKEY_LOCAL_MACHINE\Software\MozillaPlugins\@adobe.com/FlashPlayer] [HKEY_LOCAL_MACHINE\Software\MozillaPlugins\@adobe.com/FlashPlayer]
"Vendor"="Adobe" "Vendor"="Adobe"
"ProductName"="Adobe® Flash® Player ${VERSION} Plugin" "ProductName"="Adobe® Flash® Player ${VERSION} Plugin"
"Path"="${FLASH_64_PATH}\\NPSWF_${VERSION_PATH}.dll" "Path"="${FLASH_64_PATH}\\NPSWF${ARCH}_${VERSION_PATH}.dll"
"Version"="${VERSION}" "Version"="${VERSION}"
"Description"="Adobe® Flash® Player ${VERSION} Plugin" "Description"="Adobe® Flash® Player ${VERSION} Plugin"
@ -192,7 +192,7 @@
"Version"="${VERSION}" "Version"="${VERSION}"
"XPTPath"="${FLASH_32_PATH}\\flashplayer.xpt" "XPTPath"="${FLASH_32_PATH}\\flashplayer.xpt"
"Vendor"="Adobe" "Vendor"="Adobe"
"Path"="${FLASH_32_PATH}\\NPSWF_${VERSION_PATH}.dll" "Path"="${FLASH_32_PATH}\\NPSWF32_${VERSION_PATH}.dll"
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FlashPlayerPlugin_${VERSION_PATH}.exe] [HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\FlashPlayerPlugin_${VERSION_PATH}.exe]
"DisableExceptionChainValidation"=dword:00000000</value> "DisableExceptionChainValidation"=dword:00000000</value>
@ -234,7 +234,7 @@
[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerActiveX] [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerActiveX]
"Version"="${VERSION}" "Version"="${VERSION}"
"PlayerPath"="${FLASH_64_PATH}\\Flash_${VERSION_PATH}.ocx" "PlayerPath"="${FLASH_64_PATH}\\Flash${ARCH}_${VERSION_PATH}.ocx"
"UninstallerPath"=- "UninstallerPath"=-
"isScriptDebugger"=dword:00000000 "isScriptDebugger"=dword:00000000
"isMSI"=dword:00000000 "isMSI"=dword:00000000
@ -284,7 +284,7 @@
"isESR"=dword:00000000 "isESR"=dword:00000000
"isScriptDebugger"=dword:00000000 "isScriptDebugger"=dword:00000000
"UninstallerPath"=- "UninstallerPath"=-
"PlayerPath"="${FLASH_32_PATH}\\Flash_${VERSION_PATH}.ocx" "PlayerPath"="${FLASH_32_PATH}\\Flash32_${VERSION_PATH}.ocx"
"Version"="${VERSION}" "Version"="${VERSION}"
"isPartner"=dword:00000001 "isPartner"=dword:00000001
@ -294,7 +294,7 @@
<data name="installPP" xml:space="preserve"> <data name="installPP" xml:space="preserve">
<value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPepper] <value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPepper]
"UninstallerPath"=- "UninstallerPath"=-
"PlayerPath"="${FLASH_64_PATH}\\pepflashplayer_${VERSION_PATH}.dll" "PlayerPath"="${FLASH_64_PATH}\\pepflashplayer${ARCH}_${VERSION_PATH}.dll"
"isScriptDebugger"=dword:00000000 "isScriptDebugger"=dword:00000000
"isESR"=dword:00000000 "isESR"=dword:00000000
"isMSI"=dword:00000000 "isMSI"=dword:00000000
@ -307,7 +307,7 @@
<data name="installPP64" xml:space="preserve"> <data name="installPP64" xml:space="preserve">
<value>[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerPepper] <value>[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerPepper]
"UninstallerPath"=- "UninstallerPath"=-
"PlayerPath"="${FLASH_32_PATH}\\pepflashplayer_${VERSION_PATH}.dll" "PlayerPath"="${FLASH_32_PATH}\\pepflashplayer32_${VERSION_PATH}.dll"
"isScriptDebugger"=dword:00000000 "isScriptDebugger"=dword:00000000
"isESR"=dword:00000000 "isESR"=dword:00000000
"isMSI"=dword:00000000 "isMSI"=dword:00000000

Loading…
Cancel
Save