diff --git a/CleanFlashCommon/SystemInfo.cs b/CleanFlashCommon/SystemInfo.cs index aec76bd..7f335a7 100644 --- a/CleanFlashCommon/SystemInfo.cs +++ b/CleanFlashCommon/SystemInfo.cs @@ -7,6 +7,8 @@ namespace CleanFlashCommon { private static string system32Path = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86); private static string system64Path = Environment.GetFolderPath(Environment.SpecialFolder.System); + private static string program32Path = Environment.GetEnvironmentVariable("PROGRAMFILES(X86)") ?? Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + private static string flashProgram32Path = Path.Combine(program32Path, "Flash Player"); private static string macromed32Path = Path.Combine(system32Path, "Macromed"); private static string macromed64Path = Path.Combine(system64Path, "Macromed"); private static string flash32Path = Path.Combine(macromed32Path, "Flash"); @@ -17,6 +19,8 @@ namespace CleanFlashCommon { private static Dictionary replacementStrings = new Dictionary() { { "${SYSTEM_32_PATH}", system32Path.Replace(@"\", @"\\") }, { "${SYSTEM_64_PATH}", system64Path.Replace(@"\", @"\\") }, + { "${PROGRAM_32_PATH}", program32Path.Replace(@"\", @"\\") }, + { "${PROGRAM_FLASH_32_PATH}", flashProgram32Path.Replace(@"\", @"\\") }, { "${FLASH_32_PATH}", flash32Path.Replace(@"\", @"\\") }, { "${FLASH_64_PATH}", flash64Path.Replace(@"\", @"\\") }, { "${VERSION}", version }, @@ -32,6 +36,17 @@ namespace CleanFlashCommon { public static string GetSystem64Path() { return system64Path; } + + public static string GetProgram32Path() + { + return program32Path; + } + + public static string GetProgramFlash32Path() + { + return flashProgram32Path; + } + public static string[] GetSystemPaths() { if (Environment.Is64BitOperatingSystem) { return new string[] { system32Path, system64Path }; diff --git a/CleanFlashCommon/Uninstaller.cs b/CleanFlashCommon/Uninstaller.cs index 02fa5c3..d311ef6 100644 --- a/CleanFlashCommon/Uninstaller.cs +++ b/CleanFlashCommon/Uninstaller.cs @@ -90,6 +90,9 @@ namespace CleanFlashCommon { FileUtil.DeleteFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory), "Flash Center.lnk")); FileUtil.DeleteFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Flash Player.lnk")); + // Remove Flash Player from Program Files + FileUtil.WipeFolder(SystemInfo.GetProgramFlash32Path()); + // Remove spyware dropped by Flash Center in the temporary folder string tempFolder = Path.GetTempPath(); diff --git a/CleanFlashCommon/UpdateChecker.cs b/CleanFlashCommon/UpdateChecker.cs index cbf57d4..1a7e7aa 100644 --- a/CleanFlashCommon/UpdateChecker.cs +++ b/CleanFlashCommon/UpdateChecker.cs @@ -32,12 +32,13 @@ namespace CleanFlashCommon { } public class UpdateChecker { - private static readonly string FLASH_VERSION = "34.0.0.164"; - private static readonly string VERSION = "v34.0.0.164"; + private static readonly string FLASH_VERSION = "34.0.0.175"; + private static readonly string VERSION = "v34.0.0.175"; private static readonly string FLASH_PLAYER_EXECUTABLE = "flashplayer_sa.exe"; private static readonly string AUTHOR = "cleanflash"; private static readonly string REPO = "installer"; - private static readonly string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"; + private static readonly string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36"; + private static readonly bool DEBUG = false; public static string GetAPILink() { return "https://api.github.com/repos/" + AUTHOR + "/" + REPO + "/releases/latest"; @@ -55,6 +56,11 @@ namespace CleanFlashCommon { return FLASH_PLAYER_EXECUTABLE; } + public static bool IsDebug() + { + return DEBUG; + } + private static Version GetLatestVersionUnsafe() { using (WebClient client = new WebClient()) { client.Headers.Add("user-agent", USER_AGENT); diff --git a/CleanFlashInstaller/CleanFlashInstaller.csproj b/CleanFlashInstaller/CleanFlashInstaller.csproj index 7dc6175..19de751 100644 --- a/CleanFlashInstaller/CleanFlashInstaller.csproj +++ b/CleanFlashInstaller/CleanFlashInstaller.csproj @@ -1,7 +1,7 @@  + - Debug @@ -204,9 +204,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/CleanFlashInstaller/InstallForm.cs b/CleanFlashInstaller/InstallForm.cs index ae30606..f9c891c 100644 --- a/CleanFlashInstaller/InstallForm.cs +++ b/CleanFlashInstaller/InstallForm.cs @@ -173,7 +173,7 @@ If you ever change your mind, check out Clean Flash Player's website!"; private void InstallForm_Load(object sender, EventArgs e) { string version = UpdateChecker.GetFlashVersion(); - subtitleLabel.Text = string.Format("built from version {0} (China)", version); + subtitleLabel.Text = string.Format("built from version {0} ({1})", version, UpdateChecker.IsDebug() ? "DEBUG" : "China"); Text = string.Format("Clean Flash Player {0} Installer", version); OpenDisclaimerPanel(); diff --git a/CleanFlashInstaller/Installer.cs b/CleanFlashInstaller/Installer.cs index c36f4d0..eec1627 100644 --- a/CleanFlashInstaller/Installer.cs +++ b/CleanFlashInstaller/Installer.cs @@ -55,6 +55,7 @@ namespace CleanFlashInstaller { string flash32Path = SystemInfo.GetFlash32Path(); string flash64Path = SystemInfo.GetFlash64Path(); string system32Path = SystemInfo.GetSystem32Path(); + string flashProgram32Path = SystemInfo.GetProgramFlash32Path(); List registryToApply = new List() { Properties.Resources.installGeneral }; if (Environment.Is64BitOperatingSystem) { @@ -64,7 +65,7 @@ namespace CleanFlashInstaller { form.UpdateProgressLabel("Installing Flash Player utilities...", true); ExtractArchive("flash_gen_32.zip", system32Path); form.UpdateProgressLabel("Extracting uninstaller..", true); - ExtractArchive("flash_uninstaller.zip", flash32Path); + ExtractArchive("flash_uninstaller.zip", flashProgram32Path); if (flags.IsSet(InstallFlags.PEPPER)) { form.UpdateProgressLabel("Installing 32-bit Flash Player for Chrome...", true); @@ -82,11 +83,11 @@ namespace CleanFlashInstaller { } if (flags.IsSet(InstallFlags.PLAYER)) { form.UpdateProgressLabel("Installing 32-bit Standalone Flash Player...", true); - ExtractArchive("flash_player_32.zip", flash32Path); + ExtractArchive("flash_player_32.zip", flashProgram32Path); string name = "Flash Player"; string description = "Standalone Flash Player " + UpdateChecker.GetFlashVersion(); - string executable = Path.Combine(flash32Path, UpdateChecker.GetFlashPlayerExecutable()); + string executable = Path.Combine(flashProgram32Path, UpdateChecker.GetFlashPlayerExecutable()); if (flags.IsSet(InstallFlags.PLAYER_START_MENU)) { CreateShortcut(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), executable, name, description); diff --git a/CleanFlashInstaller/Properties/AssemblyInfo.cs b/CleanFlashInstaller/Properties/AssemblyInfo.cs index 132483f..4e4a98c 100644 --- a/CleanFlashInstaller/Properties/AssemblyInfo.cs +++ b/CleanFlashInstaller/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Clean Flash Player 34.0.0.164 Installer")] +[assembly: AssemblyTitle("Clean Flash Player 34.0.0.175 Installer")] [assembly: AssemblyDescription("The newest version of Flash Player, patched and ready to go beyond 2021.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("FlashPatch Team")] -[assembly: AssemblyProduct("Clean Flash Player 34.0.0.164 Installer")] +[assembly: AssemblyProduct("Clean Flash Player 34.0.0.175 Installer")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("34.0.0.164")] -[assembly: AssemblyFileVersion("34.0.0.164")] +[assembly: AssemblyVersion("34.0.0.175")] +[assembly: AssemblyFileVersion("34.0.0.175")] diff --git a/CleanFlashInstaller/Properties/Resources.resx b/CleanFlashInstaller/Properties/Resources.resx index 323ed5f..3c704da 100644 --- a/CleanFlashInstaller/Properties/Resources.resx +++ b/CleanFlashInstaller/Properties/Resources.resx @@ -139,8 +139,8 @@ "VersionMinor"=dword:00000000 "Publisher"="CleanFlash Team" "EstimatedSize"=dword:00011cb8 -"DisplayIcon"="${FLASH_32_PATH}\\FlashUtil_Uninstall.exe" -"UninstallString"="${FLASH_32_PATH}\\FlashUtil_Uninstall.exe" +"DisplayIcon"="${PROGRAM_FLASH_32_PATH}\\FlashUtil_Uninstall.exe" +"UninstallString"="${PROGRAM_FLASH_32_PATH}\\FlashUtil_Uninstall.exe" "DisplayVersion"="${VERSION}" diff --git a/CleanFlashInstaller/packages.config b/CleanFlashInstaller/packages.config index 9ffa146..0131b8f 100644 --- a/CleanFlashInstaller/packages.config +++ b/CleanFlashInstaller/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/CleanFlashUninstaller/CleanFlashUninstaller.csproj b/CleanFlashUninstaller/CleanFlashUninstaller.csproj index 298469d..598a731 100644 --- a/CleanFlashUninstaller/CleanFlashUninstaller.csproj +++ b/CleanFlashUninstaller/CleanFlashUninstaller.csproj @@ -1,7 +1,7 @@  + - Debug @@ -110,9 +110,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - + \ No newline at end of file diff --git a/CleanFlashUninstaller/Properties/AssemblyInfo.cs b/CleanFlashUninstaller/Properties/AssemblyInfo.cs index 0f19661..29efbf1 100644 --- a/CleanFlashUninstaller/Properties/AssemblyInfo.cs +++ b/CleanFlashUninstaller/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Clean Flash Player 34.0.0.164 Uninstaller")] +[assembly: AssemblyTitle("Clean Flash Player 34.0.0.175 Uninstaller")] [assembly: AssemblyDescription("The newest version of Flash Player, patched and ready to go beyond 2021.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("FlashPatch Team")] -[assembly: AssemblyProduct("Clean Flash Player 34.0.0.164 Uninstaller")] +[assembly: AssemblyProduct("Clean Flash Player 34.0.0.175 Uninstaller")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("34.0.0.164")] -[assembly: AssemblyFileVersion("34.0.0.164")] +[assembly: AssemblyVersion("34.0.0.175")] +[assembly: AssemblyFileVersion("34.0.0.175")] diff --git a/CleanFlashUninstaller/packages.config b/CleanFlashUninstaller/packages.config index 1bc7f33..09b27c4 100644 --- a/CleanFlashUninstaller/packages.config +++ b/CleanFlashUninstaller/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file