Skip to content

Commit 91f03f0

Browse files
authored
Feature: Use Edge instead of iexplore for custom command (#2006)
* Feature: Use Edge instead of iexplore for custom command * Docs: Add #2006
1 parent 0bd7432 commit 91f03f0

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

Source/NETworkManager.Models/Network/IPScannerCustomCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public static List<CustomCommandInfo> GetDefaultList()
1010
{
1111
return new List<CustomCommandInfo>
1212
{
13-
new CustomCommandInfo(Guid.NewGuid(), "Internet Explorer", "iexplore.exe", @"http://$$ipaddress$$/"),
14-
new CustomCommandInfo(Guid.NewGuid(), "Internet Explorer (https)", "iexplore.exe", @"https://$$ipaddress$$/"),
13+
new CustomCommandInfo(Guid.NewGuid(), "Edge", "cmd.exe", @"/c start microsoft-edge:http://$$ipaddress$$/"),
14+
new CustomCommandInfo(Guid.NewGuid(), "Edge (https)", "cmd.exe", @"/c start microsoft-edge:https://$$ipaddress$$/"),
1515
new CustomCommandInfo(Guid.NewGuid(), "Windows Explorer (c$)", "explorer.exe", @"\\$$ipaddress$$\c$")
1616
};
1717
}

Source/NETworkManager.Settings/SettingsManager.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,18 @@ private static void UpgradeToLatest(Version version)
246246
Current.PortScanner_PortThreads = 1024;
247247
}
248248

249+
// Add IP Scanner custom commands
250+
foreach(var customCommand in IPScannerCustomCommand.GetDefaultList())
251+
{
252+
var customCommandFound = Current.IPScanner_CustomCommands.FirstOrDefault(x => x.Name == customCommand.Name);
253+
254+
if(customCommandFound == null)
255+
{
256+
_log.Info($"Add \"{customCommand.Name}\" to \"IPScanner_CustomCommands\"...");
257+
Current.IPScanner_CustomCommands.Add(customCommand);
258+
}
259+
}
260+
249261
// Add or update Port Scanner port profiles
250262
foreach (var portProfile in PortProfile.GetDefaultList())
251263
{

docs/Changelog/next-release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ The profiles and settings are automatically migrated to the new location when th
5454
- Event handling when a host is found, user has canceled, etc. [#1969](https://github.com/BornToBeRoot/NETworkManager/pull/1969){:target="\_blank"}
5555
- 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"}
5656
- Create profile from IP scanner now passes the MAC address, if available [#1998](https://github.com/BornToBeRoot/NETworkManager/pull/1998){:target="\_blank"}
57+
- Edge added to custom commands (iexplore deprecated in new installations) [#2006](https://github.com/BornToBeRoot/NETworkManager/pull/2006){:target="\_blank"}
5758
- **Port Scanner**
5859
- Add new port profiles / improve existing ones [#1909](https://github.com/BornToBeRoot/NETworkManager/pull/1909){:target="\_blank"}
5960
- New Port state "Timed out" if the timelimit is reached. [#1969](https://github.com/BornToBeRoot/NETworkManager/pull/1969){:target="\_blank"}

docs/Documentation/01_Application/04_IPScanner.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ Custom commands that can be executed with a right click on the selected result.
137137

138138
**Default:**
139139

140-
| Name | File path | Arguments |
141-
| ------------------------- | -------------- | ------------------------ |
142-
| Internet Explorer | `iexplore.exe` | `http://$$ipaddress$$/` |
143-
| Internet Explorer (https) | `iexplore.exe` | `https://$$ipaddress$$/` |
144-
| Windows Explorer (c$) | `explorer.exe` | `\\$$ipaddress$$\c$` |
140+
| Name | File path | Arguments |
141+
| --------------------- | -------------- | ------------------------------------------------ |
142+
| Edge | `cmd.exe` | `/c start microsoft-edge:http://$$ipaddress$$/` |
143+
| Edge (https) | `cmd.exe` | `/c start microsoft-edge:https://$$ipaddress$$/` |
144+
| Windows Explorer (c$) | `explorer.exe` | `\\$$ipaddress$$\c$` |
145145

146146
In the arguments you can use the following placeholders:
147147

0 commit comments

Comments
 (0)