Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: How To Get the List of Network Connections [Conditions Tab]

$
0
0
The class used is not exposed publicly in the library. In the Source Code, look under the TaskEditor project, Native directory and find the NetworkProfile.cs class file. This is what you need. There is a static method on the class that retrieves the list of instances.
foreach (var item in Microsoft.Win32.NativeMethods.NetworkProfile.GetAllLocalProfiles())
   Console.WriteLine($"Network connection {item.Name} had an ID of {item.Id}");

Viewing all articles
Browse latest Browse all 2206

Trending Articles