Files
UnifiedFlashingPlatform/UFPTool/ListDevice.cs
T

24 lines
673 B
C#
Raw Normal View History

2024-11-17 19:28:43 +01:00
using MadWizard.WinUSBNet;
using System;
namespace UFPTool
{
internal static class ListDevice
{
internal static void Execute(string[] args)
{
USBDeviceInfo[] details = USBDevice.GetDevices("{9E3BD5F7-9690-4FCC-8810-3E2650CD6ECC}");
for (int i = 0; i < details.Length; i++)
{
Console.WriteLine($"[Device {i}]");
Console.WriteLine($"Device Path: {details[i].DevicePath}");
Console.WriteLine($"Can Flash: True");
Console.WriteLine();
}
Console.WriteLine($"Found {details.Length:d} device(s) in total.");
}
}
}