From e149c6dbe7c68a147b999385ba42b0e0f9b7b325 Mon Sep 17 00:00:00 2001 From: erri120 Date: Sun, 5 Jan 2020 14:09:34 +0100 Subject: [PATCH] Starting From Modlist now uses CLIArguments --- Wabbajack.Common/ExtensionManager.cs | 4 ++-- Wabbajack/View Models/MainWindowVM.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Wabbajack.Common/ExtensionManager.cs b/Wabbajack.Common/ExtensionManager.cs index 1f0f5075..f8e2dd6b 100644 --- a/Wabbajack.Common/ExtensionManager.cs +++ b/Wabbajack.Common/ExtensionManager.cs @@ -19,7 +19,7 @@ namespace Wabbajack.Common { {"", "Wabbajack"}, {"FriendlyTypeName", "Wabbajack"}, - {"shell\\open\\command", "\"{appPath}\" -i \"%1\""}, + {"shell\\open\\command", "\"{appPath}\" -i=\"%1\""}, }; private static readonly Dictionary ExtList = new Dictionary @@ -34,7 +34,7 @@ namespace Wabbajack.Common var tempKey = progIDKey?.OpenSubKey("shell\\open\\command"); if (progIDKey == null || tempKey == null) return true; var value = tempKey.GetValue(""); - return value == null || value.ToString().Equals($"\"{appPath}\" -i \"%1\""); + return value == null || value.ToString().Equals($"\"{appPath}\" -i=\"%1\""); } public static bool IsAssociated() diff --git a/Wabbajack/View Models/MainWindowVM.cs b/Wabbajack/View Models/MainWindowVM.cs index 8a5f16de..ddd70b8a 100644 --- a/Wabbajack/View Models/MainWindowVM.cs +++ b/Wabbajack/View Models/MainWindowVM.cs @@ -129,16 +129,16 @@ namespace Wabbajack .Select(active => !SettingsPane.IsValueCreated || !object.ReferenceEquals(active, SettingsPane.Value)), execute: () => NavigateTo(SettingsPane.Value)); } + private static bool IsStartingFromModlist(out string modlistPath) { - string[] args = Environment.GetCommandLineArgs(); - if (args.Length != 3 || !args[1].Contains("-i")) + if (CLIArguments.InstallPath == null) { modlistPath = default; return false; } - modlistPath = args[2]; + modlistPath = CLIArguments.InstallPath; return true; }