From f3bb2ed5bddb85bb72e365a9b5eee1997d39b691 Mon Sep 17 00:00:00 2001 From: Hampus Toft Date: Mon, 27 Jul 2026 13:52:17 +0200 Subject: [PATCH] fixed install path Moved from `%appdata%/...` to `%programfiles%/...` (default is `C:/Program Files`). This should fix setups that use a Windows "User" account instead of "Administrator" account. --- .../Core/LauncherUpdateManager.cs | 11 ++++++++--- .../GeneratedBuildInfo.cs | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/BfmeFoundationProject_AllInOneLauncher/Core/LauncherUpdateManager.cs b/src/BfmeFoundationProject_AllInOneLauncher/Core/LauncherUpdateManager.cs index 563ab96..8cd54d5 100644 --- a/src/BfmeFoundationProject_AllInOneLauncher/Core/LauncherUpdateManager.cs +++ b/src/BfmeFoundationProject_AllInOneLauncher/Core/LauncherUpdateManager.cs @@ -12,7 +12,9 @@ namespace BfmeFoundationProject.AllInOneLauncher.Core; public static class LauncherUpdateManager { - public static string LauncherAppDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "BFME All In One Launcher"); + public static string LauncherAppDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "BFME All In One Launcher"); + + public static string LauncherUserDataDirectory => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "BFME All In One Launcher"); public static async void CheckForUpdates() { @@ -25,6 +27,9 @@ public static async void CheckForUpdates() if (!Directory.Exists(LauncherAppDirectory)) Directory.CreateDirectory(LauncherAppDirectory); + if (!Directory.Exists(LauncherUserDataDirectory)) + Directory.CreateDirectory(LauncherUserDataDirectory); + string curentVersionHash = ""; string latestVersionHash = ""; @@ -45,14 +50,14 @@ public static async void CheckForUpdates() MainWindow.Instance.Dispatcher.Invoke(() => { - if (!File.Exists(Path.Combine(LauncherUpdateManager.LauncherAppDirectory, "update_2_complete.txt"))) + if (!File.Exists(Path.Combine(LauncherUpdateManager.LauncherUserDataDirectory, "update_2_complete.txt"))) { Properties.Settings.Default.ArenaUpdateBranch = "main"; Properties.Settings.Default.Save(); PopupVisualizer.ShowPopup(new DonatePopup()); - File.WriteAllText(Path.Combine(LauncherUpdateManager.LauncherAppDirectory, "update_2_complete.txt"), "1"); + File.WriteAllText(Path.Combine(LauncherUpdateManager.LauncherUserDataDirectory, "update_2_complete.txt"), "1"); } }); diff --git a/src/BfmeFoundationProject_AllInOneLauncher/GeneratedBuildInfo.cs b/src/BfmeFoundationProject_AllInOneLauncher/GeneratedBuildInfo.cs index 13201d7..816b035 100644 --- a/src/BfmeFoundationProject_AllInOneLauncher/GeneratedBuildInfo.cs +++ b/src/BfmeFoundationProject_AllInOneLauncher/GeneratedBuildInfo.cs @@ -1,4 +1,4 @@ public static class BuildInfo { - public static readonly string BuildIdentifier = "1228-1440"; + public static readonly string BuildIdentifier = "0727-1315"; }