diff --git a/src/Export.cs b/src/Export.cs index bcf7e5a..62ea5f7 100644 --- a/src/Export.cs +++ b/src/Export.cs @@ -58,13 +58,8 @@ public static class Export { } private static void ToSnapGenshin(AchievementAllDataNotify data) { - if (CheckSnapScheme()) { - Utils.CopyToClipboard(JsonConvert.SerializeObject(ExportToUIAFApp(data))); - Utils.ShellOpen("snapgenshin://achievement/import/uiaf"); - Console.WriteLine(App.ExportToSnapGenshinSuccess); - } else { - Console.WriteLine(App.ExportToSnapGenshinNeedUpdate); - } + Utils.CopyToClipboard(JsonConvert.SerializeObject(ExportToUIAFApp(data))); + Console.WriteLine(App.ExportToSnapGenshinSuccess); } private static void ToPaimon(AchievementAllDataNotify data) { @@ -173,10 +168,6 @@ public static class Export { } #pragma warning disable CA1416 - private static bool CheckSnapScheme() { - return (string?)Registry.ClassesRoot.OpenSubKey("snapgenshin")?.GetValue("") == "URL:snapgenshin"; - } - private static bool CheckXunkongScheme() { return (string?)Registry.ClassesRoot.OpenSubKey("xunkong")?.GetValue("") == "URL:xunkong"; } diff --git a/src/Utils.cs b/src/Utils.cs index d14c2f9..31100b4 100644 --- a/src/Utils.cs +++ b/src/Utils.cs @@ -193,7 +193,8 @@ public static class Utils { // ReSharper disable once UnusedMethodReturnValue.Global public static Thread StartAndWaitResult(string exePath, Func onReceive) { - const string lib = "C:/ProgramData/yae.dll"; + var dataDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); + var lib = Path.Combine(dataDir, "yae.dll"); File.Copy(Path.GetFullPath(GlobalVars.LibName), lib, true); AppDomain.CurrentDomain.ProcessExit += (_, _) => { File.Delete(lib);