Skip to content

Tapiolavi/SimpleDeviceManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple device manager

POC to fast prototyping to disable and enable devices.

Available drivers to handle devices

  • DeviceDriverNetshService (uses netsh.exe)
  • DeviceDriverrWmiService (uses Windows Management Instrumentation Win32_NetworkAdapter in quering)
  • DeviceDriverSystemDeviceManager (uses Windows Management Instrumentation Win32_PnPEntity in quering)

Usage

Initialize

private INetworkDriverServiceManager deviceManager;

deviceManager = new DeviceDriverServiceManager();

deviceManager.RegisterService("Network Wmi Driver", new DeviceDriverrWmiService());
deviceManager.RegisterService("Network Nets Driver", new DeviceDriverNetshService());
deviceManager.RegisterService("System Device management Driver", new DeviceDriverSystemDeviceManagerService());

Get available services

private INetworkDriverServiceManager deviceManager;

deviceManager.GetServiceNames();

Get service

private INetworkDriverServiceManager deviceManager;

deviceManager.GetServiceNames();

deviceManager.GetService("Network Wmi Driver");

List devices

Returns list of devicenames available

private INetworkDriverServiceManager deviceManager;

deviceManager.GetServiceNames();

deviceManager.GetService("Network Wmi Driver").getDeviceList();


Enable device

private INetworkDriverServiceManager deviceManager;

deviceManager.GetServiceNames();

deviceManager.GetService("Network Wmi Driver").EnableDevice('Media teck wifi 6g etc');

Check if devise is enabled

private INetworkDriverServiceManager deviceManager;

deviceManager.GetServiceNames();

deviceManager.GetService("Network Wmi Driver").IsDeviceEnabled('Media teck wifi 6g etc');

About

Simple device manager poc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages