mirror of
https://gitlab.com/cleanflash/installer.git
synced 2026-08-12 18:31:37 +08:00
version: Bump version to 34.0.0.164 and fix ownership issues
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
<Compile Include="SystemInfo.cs" />
|
||||
<Compile Include="Uninstaller.cs" />
|
||||
<Compile Include="UpdateChecker.cs" />
|
||||
<Compile Include="WinAPI.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
|
||||
@@ -18,6 +18,10 @@ namespace CleanFlashCommon {
|
||||
"seamonkey", "palemoon", "plugin-container"
|
||||
};
|
||||
|
||||
static Uninstaller() {
|
||||
WinAPI.AllowModifications();
|
||||
}
|
||||
|
||||
public static void UninstallRegistry() {
|
||||
if (Environment.Is64BitOperatingSystem) {
|
||||
RegistryManager.ApplyRegistry(Properties.Resources.uninstallRegistry, Properties.Resources.uninstallRegistry64);
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace CleanFlashCommon {
|
||||
}
|
||||
|
||||
public class UpdateChecker {
|
||||
private static readonly string FLASH_VERSION = "34.0.0.155";
|
||||
private static readonly string VERSION = "v34.0.0.155";
|
||||
private static readonly string FLASH_VERSION = "34.0.0.164";
|
||||
private static readonly string VERSION = "v34.0.0.164";
|
||||
private static readonly string FLASH_PLAYER_EXECUTABLE = "flashplayer_sa.exe";
|
||||
private static readonly string AUTHOR = "cleanflash";
|
||||
private static readonly string REPO = "installer";
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace CleanFlashCommon {
|
||||
public class WinAPI {
|
||||
|
||||
public static void AllowModifications() {
|
||||
ModifyPrivilege(PrivilegeName.SeRestorePrivilege, true);
|
||||
ModifyPrivilege(PrivilegeName.SeTakeOwnershipPrivilege, true);
|
||||
}
|
||||
|
||||
public static bool ModifyPrivilege(PrivilegeName privilege, bool enable) {
|
||||
LUID luid;
|
||||
|
||||
if (!LookupPrivilegeValue(null, privilege.ToString(), out luid)) {
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
using (var identity = WindowsIdentity.GetCurrent(TokenAccessLevels.AdjustPrivileges | TokenAccessLevels.Query)) {
|
||||
var newPriv = new TOKEN_PRIVILEGES();
|
||||
newPriv.Privileges = new LUID_AND_ATTRIBUTES[1];
|
||||
newPriv.PrivilegeCount = 1;
|
||||
newPriv.Privileges[0].Luid = luid;
|
||||
newPriv.Privileges[0].Attributes = enable ? SE_PRIVILEGE_ENABLED : 0;
|
||||
|
||||
var prevPriv = new TOKEN_PRIVILEGES();
|
||||
prevPriv.Privileges = new LUID_AND_ATTRIBUTES[1];
|
||||
prevPriv.PrivilegeCount = 1;
|
||||
uint returnedBytes;
|
||||
|
||||
if (!AdjustTokenPrivileges(identity.Token, false, ref newPriv, (uint)Marshal.SizeOf(prevPriv), ref prevPriv, out returnedBytes)) {
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
return prevPriv.PrivilegeCount == 0 ? enable /* didn't make a change */ : ((prevPriv.Privileges[0].Attributes & SE_PRIVILEGE_ENABLED) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
const uint SE_PRIVILEGE_ENABLED = 2;
|
||||
|
||||
[DllImport("advapi32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, [MarshalAs(UnmanagedType.Bool)] bool DisableAllPrivileges, ref TOKEN_PRIVILEGES NewState,
|
||||
UInt32 BufferLengthInBytes, ref TOKEN_PRIVILEGES PreviousState, out UInt32 ReturnLengthInBytes);
|
||||
|
||||
[DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, out LUID lpLuid);
|
||||
|
||||
struct TOKEN_PRIVILEGES {
|
||||
public UInt32 PrivilegeCount;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1 /*ANYSIZE_ARRAY*/)]
|
||||
public LUID_AND_ATTRIBUTES[] Privileges;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct LUID_AND_ATTRIBUTES {
|
||||
public LUID Luid;
|
||||
public UInt32 Attributes;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct LUID {
|
||||
public uint LowPart;
|
||||
public int HighPart;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PrivilegeName {
|
||||
SeAssignPrimaryTokenPrivilege,
|
||||
SeAuditPrivilege,
|
||||
SeBackupPrivilege,
|
||||
SeChangeNotifyPrivilege,
|
||||
SeCreateGlobalPrivilege,
|
||||
SeCreatePagefilePrivilege,
|
||||
SeCreatePermanentPrivilege,
|
||||
SeCreateSymbolicLinkPrivilege,
|
||||
SeCreateTokenPrivilege,
|
||||
SeDebugPrivilege,
|
||||
SeEnableDelegationPrivilege,
|
||||
SeImpersonatePrivilege,
|
||||
SeIncreaseBasePriorityPrivilege,
|
||||
SeIncreaseQuotaPrivilege,
|
||||
SeIncreaseWorkingSetPrivilege,
|
||||
SeLoadDriverPrivilege,
|
||||
SeLockMemoryPrivilege,
|
||||
SeMachineAccountPrivilege,
|
||||
SeManageVolumePrivilege,
|
||||
SeProfileSingleProcessPrivilege,
|
||||
SeRelabelPrivilege,
|
||||
SeRemoteShutdownPrivilege,
|
||||
SeRestorePrivilege,
|
||||
SeSecurityPrivilege,
|
||||
SeShutdownPrivilege,
|
||||
SeSyncAgentPrivilege,
|
||||
SeSystemEnvironmentPrivilege,
|
||||
SeSystemProfilePrivilege,
|
||||
SeSystemtimePrivilege,
|
||||
SeTakeOwnershipPrivilege,
|
||||
SeTcbPrivilege,
|
||||
SeTimeZonePrivilege,
|
||||
SeTrustedCredManAccessPrivilege,
|
||||
SeUndockPrivilege,
|
||||
SeUnsolicitedInputPrivilege,
|
||||
}
|
||||
}
|
||||
@@ -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.155 Installer")]
|
||||
[assembly: AssemblyTitle("Clean Flash Player 34.0.0.164 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.155 Installer")]
|
||||
[assembly: AssemblyProduct("Clean Flash Player 34.0.0.164 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.155")]
|
||||
[assembly: AssemblyFileVersion("34.0.0.155")]
|
||||
[assembly: AssemblyVersion("34.0.0.164")]
|
||||
[assembly: AssemblyFileVersion("34.0.0.164")]
|
||||
|
||||
+19
-16
@@ -146,23 +146,26 @@ namespace CleanFlashInstaller.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Classes\.mfp]
|
||||
///"Content Type"="application/x-shockwave-flash"
|
||||
///@="MacromediaFlashPaper.MacromediaFlashPaper"
|
||||
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer]
|
||||
///"CurrentVersion"="${VERSION_COMMA}"
|
||||
///
|
||||
///[HKEY_LOCAL_MACHINE\Software\Classes\.sol]
|
||||
///"Content Type"="text/plain"
|
||||
///
|
||||
///[HKEY_LOCAL_MACHINE\Software\Classes\.sor]
|
||||
///"Content Type"="text/plain"
|
||||
///
|
||||
///[HKEY_LOCAL_MACHINE\Software\Classes\.spl]
|
||||
///"Content Type"="application/futuresplash"
|
||||
///@="ShockwaveFlash.ShockwaveFlash"
|
||||
///
|
||||
///[HKEY_LOCAL_MACHINE\Software\Classes\.swf]
|
||||
///"Content Type"="application/x-shockwave-flash"
|
||||
///@="Sh [rest of string was truncated]";.
|
||||
///[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer\SafeVersions]
|
||||
///"20.0"=dword:ffffffff
|
||||
///"21.0"=dword:ffffffff
|
||||
///"22.0"=dword:ffffffff
|
||||
///"23.0"=dword:ffffffff
|
||||
///"24.0"=dword:ffffffff
|
||||
///"25.0"=dword:ffffffff
|
||||
///"26.0"=dword:ffffffff
|
||||
///"27.0"=dword:ffffffff
|
||||
///"28.0"=dword:ffffffff
|
||||
///"19.0"=dword:ffffffff
|
||||
///"30.0"=dword:ffffffff
|
||||
///"31.0"=dword:ffffffff
|
||||
///"32.0"=dword:ffffffff
|
||||
///"33.0"=dword:ffffffff
|
||||
///"34.0"=dword:00000089
|
||||
///"16.0"= [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string installOCX {
|
||||
get {
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
@@ -198,25 +198,7 @@
|
||||
"DisableExceptionChainValidation"=dword:00000000</value>
|
||||
</data>
|
||||
<data name="installOCX" xml:space="preserve">
|
||||
<value>[HKEY_LOCAL_MACHINE\Software\Classes\.mfp]
|
||||
"Content Type"="application/x-shockwave-flash"
|
||||
@="MacromediaFlashPaper.MacromediaFlashPaper"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Classes\.sol]
|
||||
"Content Type"="text/plain"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Classes\.sor]
|
||||
"Content Type"="text/plain"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Classes\.spl]
|
||||
"Content Type"="application/futuresplash"
|
||||
@="ShockwaveFlash.ShockwaveFlash"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Classes\.swf]
|
||||
"Content Type"="application/x-shockwave-flash"
|
||||
@="ShockwaveFlash.ShockwaveFlash"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer]
|
||||
<value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer]
|
||||
"CurrentVersion"="${VERSION_COMMA}"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer\SafeVersions]
|
||||
@@ -260,17 +242,7 @@
|
||||
"isESR"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerActiveXReleaseType]
|
||||
"Release"=dword:00000001
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}]
|
||||
"Compatibility Flags"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB70-AE6D-11cf-96B8-444553540000}]
|
||||
"Compatibility Flags"=dword:00010000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\NavigatorPluginsList\Shockwave Flash]
|
||||
"application/futuresplash"=""
|
||||
"application/x-shockwave-flash"=""</value>
|
||||
"Release"=dword:00000001</value>
|
||||
</data>
|
||||
<data name="installOCX64" xml:space="preserve">
|
||||
<value>[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayer]
|
||||
@@ -317,17 +289,7 @@
|
||||
"isPartner"=dword:00000001
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerActiveXReleaseType]
|
||||
"Release"=dword:00000001
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}]
|
||||
"Compatibility Flags"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB70-AE6D-11cf-96B8-444553540000}]
|
||||
"Compatibility Flags"=dword:00010000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Internet Explorer\NavigatorPluginsList\Shockwave Flash]
|
||||
"application/x-shockwave-flash"=""
|
||||
"application/futuresplash"=""</value>
|
||||
"Release"=dword:00000001</value>
|
||||
</data>
|
||||
<data name="installPP" xml:space="preserve">
|
||||
<value>[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayerPepper]
|
||||
@@ -355,4 +317,4 @@
|
||||
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Macromedia\FlashPlayerPepperReleaseType]
|
||||
"Release"=dword:00000001</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
@@ -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.155 Uninstaller")]
|
||||
[assembly: AssemblyTitle("Clean Flash Player 34.0.0.164 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.155 Uninstaller")]
|
||||
[assembly: AssemblyProduct("Clean Flash Player 34.0.0.164 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.155")]
|
||||
[assembly: AssemblyFileVersion("34.0.0.155")]
|
||||
[assembly: AssemblyVersion("34.0.0.164")]
|
||||
[assembly: AssemblyFileVersion("34.0.0.164")]
|
||||
|
||||
Reference in New Issue
Block a user