From bbb56f881c4ab67d453b6caba0bbe401125ac770 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Tue, 7 Mar 2023 00:22:11 +0100 Subject: [PATCH 1/2] Feature: Use Edge instead of iexplore for custom command --- .../Network/IPScannerCustomCommand.cs | 4 ++-- Source/NETworkManager.Settings/SettingsManager.cs | 12 ++++++++++++ docs/Documentation/01_Application/04_IPScanner.md | 10 +++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Source/NETworkManager.Models/Network/IPScannerCustomCommand.cs b/Source/NETworkManager.Models/Network/IPScannerCustomCommand.cs index d87285d0fd..717fa47aef 100644 --- a/Source/NETworkManager.Models/Network/IPScannerCustomCommand.cs +++ b/Source/NETworkManager.Models/Network/IPScannerCustomCommand.cs @@ -10,8 +10,8 @@ public static List GetDefaultList() { return new List { - new CustomCommandInfo(Guid.NewGuid(), "Internet Explorer", "iexplore.exe", @"http://$$ipaddress$$/"), - new CustomCommandInfo(Guid.NewGuid(), "Internet Explorer (https)", "iexplore.exe", @"https://$$ipaddress$$/"), + new CustomCommandInfo(Guid.NewGuid(), "Edge", "cmd.exe", @"/c start microsoft-edge:http://$$ipaddress$$/"), + new CustomCommandInfo(Guid.NewGuid(), "Edge (https)", "cmd.exe", @"/c start microsoft-edge:https://$$ipaddress$$/"), new CustomCommandInfo(Guid.NewGuid(), "Windows Explorer (c$)", "explorer.exe", @"\\$$ipaddress$$\c$") }; } diff --git a/Source/NETworkManager.Settings/SettingsManager.cs b/Source/NETworkManager.Settings/SettingsManager.cs index 7b3c705487..0e745bf565 100644 --- a/Source/NETworkManager.Settings/SettingsManager.cs +++ b/Source/NETworkManager.Settings/SettingsManager.cs @@ -246,6 +246,18 @@ private static void UpgradeToLatest(Version version) Current.PortScanner_PortThreads = 1024; } + // Add IP Scanner custom commands + foreach(var customCommand in IPScannerCustomCommand.GetDefaultList()) + { + var customCommandFound = Current.IPScanner_CustomCommands.FirstOrDefault(x => x.Name == customCommand.Name); + + if(customCommandFound == null) + { + _log.Info($"Add \"{customCommand.Name}\" to \"IPScanner_CustomCommands\"..."); + Current.IPScanner_CustomCommands.Add(customCommand); + } + } + // Add or update Port Scanner port profiles foreach (var portProfile in PortProfile.GetDefaultList()) { diff --git a/docs/Documentation/01_Application/04_IPScanner.md b/docs/Documentation/01_Application/04_IPScanner.md index 5db8938ce6..79bddd49a2 100644 --- a/docs/Documentation/01_Application/04_IPScanner.md +++ b/docs/Documentation/01_Application/04_IPScanner.md @@ -137,11 +137,11 @@ Custom commands that can be executed with a right click on the selected result. **Default:** -| Name | File path | Arguments | -| ------------------------- | -------------- | ------------------------ | -| Internet Explorer | `iexplore.exe` | `http://$$ipaddress$$/` | -| Internet Explorer (https) | `iexplore.exe` | `https://$$ipaddress$$/` | -| Windows Explorer (c$) | `explorer.exe` | `\\$$ipaddress$$\c$` | +| Name | File path | Arguments | +| --------------------- | -------------- | ------------------------------------------------ | +| Edge | `cmd.exe` | `/c start microsoft-edge:http://$$ipaddress$$/` | +| Edge (https) | `cmd.exe` | `/c start microsoft-edge:https://$$ipaddress$$/` | +| Windows Explorer (c$) | `explorer.exe` | `\\$$ipaddress$$\c$` | In the arguments you can use the following placeholders: From e6260848456f180d6e3a1e805eca31caf1aa441e Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Tue, 7 Mar 2023 00:24:53 +0100 Subject: [PATCH 2/2] Docs: Add #2006 --- docs/Changelog/next-release.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Changelog/next-release.md b/docs/Changelog/next-release.md index a27c8877f9..c623cda218 100644 --- a/docs/Changelog/next-release.md +++ b/docs/Changelog/next-release.md @@ -53,6 +53,7 @@ The profiles and settings are automatically migrated to the new location when th - Event handling when a host is found, user has canceled, etc. [#1969](https://github.com/BornToBeRoot/NETworkManager/pull/1969){:target="\_blank"} - Remove option to set the preferred IP protocol for DNS resolution (can now be set globally) [#1950](https://github.com/BornToBeRoot/NETworkManager/pull/1950){:target="\_blank"} - Create profile from IP scanner now passes the MAC address, if available [#1998](https://github.com/BornToBeRoot/NETworkManager/pull/1998){:target="\_blank"} + - Edge added to custom commands (iexplore deprecated in new installations) [#2006](https://github.com/BornToBeRoot/NETworkManager/pull/2006){:target="\_blank"} - **Port Scanner** - Add new port profiles / improve existing ones [#1909](https://github.com/BornToBeRoot/NETworkManager/pull/1909){:target="\_blank"} - New Port state "Timed out" if the timelimit is reached. [#1969](https://github.com/BornToBeRoot/NETworkManager/pull/1969){:target="\_blank"}