Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How to enable & disable USB ports from .NET applications?

How to enable & disable USB ports from .NET applications?

Scheduled Pinned Locked Moved Windows Forms
csharpdotnettutorialquestion
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abyclassic
    wrote on last edited by
    #1

    Dear All, i have developed a desktop based application using C#.NET, which require access to some USB based devices. I have to use this application on target PCs in which the USB port is disabled by the system administrator. From the application, i wants to enable & disable the USB drives programatically, so that no other application can use the USB ports, as per configured by the system administrator. ie, enable the USB port before the application require access to the USB port it & disable it after the use. I need to achieve the same when the application is running in a login, who doesn't have administrative rights. Is it possible to achieve the same using .NET framework? Do any one knows how to implement the same. If so, please inform me. Best Regards, Abhilash Chandran

    D 1 Reply Last reply
    0
    • A abyclassic

      Dear All, i have developed a desktop based application using C#.NET, which require access to some USB based devices. I have to use this application on target PCs in which the USB port is disabled by the system administrator. From the application, i wants to enable & disable the USB drives programatically, so that no other application can use the USB ports, as per configured by the system administrator. ie, enable the USB port before the application require access to the USB port it & disable it after the use. I need to achieve the same when the application is running in a login, who doesn't have administrative rights. Is it possible to achieve the same using .NET framework? Do any one knows how to implement the same. If so, please inform me. Best Regards, Abhilash Chandran

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Using the standard drivers for USB, you can't do what you want, no matter what language you use. Hardware is shared system-wide and is completely abstracted from your application, giving you no control over access to the USB ports. You would have to write your own USB drivers in order to support this.

      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups