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. C#
  4. how to enable & disable USB ports from .NET applications?

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

Scheduled Pinned Locked Moved C#
csharpdotnettutorialquestion
3 Posts 2 Posters 0 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

    N 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

      N Offline
      N Offline
      Niiiissssshhhhhuuuuu
      wrote on last edited by
      #2

      Hello, http://www.codeproject.com/system/RemoveDriveByLetter.asp[^] http://www.codeproject.com/useritems/usbeject.asp[^] Try this... Regards :rose:, Nishu

      A 1 Reply Last reply
      0
      • N Niiiissssshhhhhuuuuu

        Hello, http://www.codeproject.com/system/RemoveDriveByLetter.asp[^] http://www.codeproject.com/useritems/usbeject.asp[^] Try this... Regards :rose:, Nishu

        A Offline
        A Offline
        abyclassic
        wrote on last edited by
        #3

        Thank you for ur reply. But, my requirement is slightly different. My application has to run on a system in which the USB ports are disabled by the system administrator. From my application i have to enable the USB drive, so that only a particular USB device must be able to use the USB drive. My application uses this USB device & finally when the application finishes using the USB device, i have to disable the USB drive again from the application. All the above actions i have to perform in a non adminisrator login. If you have any information regarding the same, plz let me know Best Regards, Abhilash

        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