version: Bump version to 34.0.0.164 and fix ownership issues

test-ci
Daniel 4 years ago
parent 91c09ff019
commit 606d5c1e47

@ -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")]

@ -146,23 +146,26 @@ namespace CleanFlashInstaller.Properties {
}
/// <summary>
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Classes\.mfp]
///&quot;Content Type&quot;=&quot;application/x-shockwave-flash&quot;
///@=&quot;MacromediaFlashPaper.MacromediaFlashPaper&quot;
///
///[HKEY_LOCAL_MACHINE\Software\Classes\.sol]
///&quot;Content Type&quot;=&quot;text/plain&quot;
///
///[HKEY_LOCAL_MACHINE\Software\Classes\.sor]
///&quot;Content Type&quot;=&quot;text/plain&quot;
///
///[HKEY_LOCAL_MACHINE\Software\Classes\.spl]
///&quot;Content Type&quot;=&quot;application/futuresplash&quot;
///@=&quot;ShockwaveFlash.ShockwaveFlash&quot;
/// Looks up a localized string similar to [HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer]
///&quot;CurrentVersion&quot;=&quot;${VERSION_COMMA}&quot;
///
///[HKEY_LOCAL_MACHINE\Software\Classes\.swf]
///&quot;Content Type&quot;=&quot;application/x-shockwave-flash&quot;
///@=&quot;Sh [rest of string was truncated]&quot;;.
///[HKEY_LOCAL_MACHINE\Software\Macromedia\FlashPlayer\SafeVersions]
///&quot;20.0&quot;=dword:ffffffff
///&quot;21.0&quot;=dword:ffffffff
///&quot;22.0&quot;=dword:ffffffff
///&quot;23.0&quot;=dword:ffffffff
///&quot;24.0&quot;=dword:ffffffff
///&quot;25.0&quot;=dword:ffffffff
///&quot;26.0&quot;=dword:ffffffff
///&quot;27.0&quot;=dword:ffffffff
///&quot;28.0&quot;=dword:ffffffff
///&quot;19.0&quot;=dword:ffffffff
///&quot;30.0&quot;=dword:ffffffff
///&quot;31.0&quot;=dword:ffffffff
///&quot;32.0&quot;=dword:ffffffff
///&quot;33.0&quot;=dword:ffffffff
///&quot;34.0&quot;=dword:00000089
///&quot;16.0&quot;= [rest of string was truncated]&quot;;.
/// </summary>
internal static string installOCX {
get {

@ -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]

@ -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")]

Loading…
Cancel
Save