mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Set uninstall version on install/update (#47)
Version has also been bumped to v1.5.4
This commit is contained in:
parent
66f6cd16cd
commit
9244234860
@ -10,8 +10,8 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Platforms>AnyCPU;x86</Platforms>
|
||||
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
|
||||
<Version>1.5.3</Version>
|
||||
<FileVersion>1.5.3.0</FileVersion>
|
||||
<Version>1.5.4</Version>
|
||||
<FileVersion>1.5.4.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -284,7 +284,11 @@ namespace Bloxstrap
|
||||
RegistryKey uninstallKey = Registry.CurrentUser.CreateSubKey($@"Software\Microsoft\Windows\CurrentVersion\Uninstall\{Program.ProjectName}");
|
||||
uninstallKey.SetValue("DisplayIcon", $"{Directories.App},0");
|
||||
uninstallKey.SetValue("DisplayName", Program.ProjectName);
|
||||
uninstallKey.SetValue("DisplayVersion", Program.Version);
|
||||
|
||||
if (uninstallKey.GetValue("InstallDate") is null)
|
||||
uninstallKey.SetValue("InstallDate", DateTime.Now.ToString("yyyyMMdd"));
|
||||
|
||||
uninstallKey.SetValue("InstallLocation", Directories.Base);
|
||||
uninstallKey.SetValue("NoRepair", 1);
|
||||
uninstallKey.SetValue("Publisher", Program.ProjectName);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Bloxstrap.Helpers
|
||||
{
|
||||
internal class Directories
|
||||
class Directories
|
||||
{
|
||||
public static string Base { get; private set; } = "";
|
||||
public static string Downloads { get; private set; } = "";
|
||||
|
@ -34,6 +34,8 @@ namespace Bloxstrap.Helpers
|
||||
File.Delete(Directories.App);
|
||||
File.Copy(Environment.ProcessPath, Directories.App);
|
||||
|
||||
Bootstrapper.Register();
|
||||
|
||||
Program.ShowMessageBox(
|
||||
$"{Program.ProjectName} has been updated to v{currentVersionInfo.ProductVersion}",
|
||||
MessageBoxIcon.Information,
|
||||
|
@ -10,6 +10,7 @@ using Bloxstrap.Models;
|
||||
using Bloxstrap.Dialogs;
|
||||
using System.Net.Http;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Bloxstrap
|
||||
{
|
||||
@ -34,6 +35,8 @@ namespace Bloxstrap
|
||||
public static string LocalAppData { get; private set; } = null!;
|
||||
public static string StartMenu { get; private set; } = null!;
|
||||
|
||||
public static string Version = Assembly.GetExecutingAssembly().GetName().Version!.ToString()[..^2];
|
||||
|
||||
public static SettingsManager SettingsManager = new();
|
||||
public static SettingsFormat Settings = SettingsManager.Settings;
|
||||
public static readonly HttpClient HttpClient = new(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All });
|
||||
|
Loading…
Reference in New Issue
Block a user