diff --git a/LANCommander/Components/InputRegistry.razor b/LANCommander/Components/InputRegistry.razor index 7cf6d59..e0922bf 100644 --- a/LANCommander/Components/InputRegistry.razor +++ b/LANCommander/Components/InputRegistry.razor @@ -29,7 +29,15 @@ protected override async Task OnInitializedAsync() { - Hive = AvailableHives.FirstOrDefault(h => Value != null && Value.StartsWith(h)); + if (Hive == null) + Hive = "HKCU:\\"; + + if (Value == null) + Value = Hive; + + if (!String.IsNullOrWhiteSpace(Value)) + Hive = AvailableHives.FirstOrDefault(h => Value != null && Value.StartsWith(h)); + Path = Value.Substring(Hive.Length); }