Skip to main content

How to Unblock USB Ports-Through Regedit,Batch script & C

Usb_unblock.jpg
Sometime we want to copy data from our college’s computers…but when we plug in the USB drive, system didn’t show it off...actually at that time the USB ports are disabled by the college authority due to some reasons.Here Today I’m going explain you that how to disable/Enable USB ports.



 There are several methods to do it , so first we start from the Basic Method (i.e., Directly Edit the Registry) 

 Regedit Method

1. Open registry [Go to START MENU > RUN >Type regedit and hit Enter].

2. Navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
 

Usb_unblock1.jpg
3. Now in right side pane Double click on REG_DWORD Start, A pop up window appears.

Usb_unblock2.jpg
Change its value to 4 for Disable the USB
Change its value to 3 for Enable the USB

Through Batch Script

1. Open Notepad [Press Windows_Key+R combination then type notepad and hit Enter] 

2. Copy/paste the following code to notepad

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR /v Start /t REG_DWORD /d 4 /f
 
3. Now save it as BlockUSB.bat.
4. Again open notepad and copy/paste the following code

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR /v Start /t REG_DWORD /d 3 /f
 
save it as UnblockUSB.bat

How to Use these Files
1. Open BlockUSB.bat with Administrator permissions to disable the USB drive.

2. Open UnblockUSB.bat file with Administrator permissions to enable the USB drive.

Through C Programming

"First of all I want to clear you that here we didn’t use something new...We just transform the above Batch Script Code into C source Code"

1. Open your C-compiler and copy/paste the below given Source Code.

#include 
void main(){
reg add
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t
REG_DWORD \/d 4 \/f
}
 

   Compile it and Save it As BlockUSB.c.
 2. Again open your C compiler and Copy/paste below given Source code.

#include 
void main(){
reg add
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t
REG_DWORD \/d 4 \/f
}
 
 Compile it and save it as UnblockUSB.c.
3. Now you can use/execute/run BlockUSB.c to blocking the USB ports and UnblockUSB.c to Unblock.

 Please leave your Valuable Comments :)

Comments

  1. Amazing blog and very interesting stuff you got here! I definitely learned a lot from reading through some of your earlier posts as well and decided to drop a comment on this one!

    ReplyDelete
    Replies
    1. it's our pleasure that you like our articles,i just want to say that we need your support so keep supporting us .
      Have a Good Day..!

      Delete
  2. It ask for administrator password..is there another way to bypass it??

    ReplyDelete
    Replies
    1. OK.. i'll try to provide you the alternate solution to Unblock USB ports very soon..

      --Keep Visiting--

      Delete
  3. can we block only one port not all ports ?

    ReplyDelete
    Replies
    1. For blocking any other or all ports follow these steps:-

      1.Press Windows+R (or go to start menu then open Run),Type devmgmt.msc & hit enter. it will Open Device Manager.

      2.Now find & Expand "Universal Serial Bus Controllers"
      3.Right Click the USB port name to Disable or enable it.
      Done..!

      Delete
  4. Your all tricks are helpful to me thanks bro

    ReplyDelete
    Replies
    1. thanks for appreciating our work :)..

      keep visiting

      Delete
  5. thanks very useful

    ReplyDelete
  6. That is an extremely smartly written article. I will be sure to bookmark it and return to learn extra of your useful information. Thank you for the post. I will certainly return.

    ReplyDelete
  7. Hi, Really great effort. Everyone must read this article. Thanks for sharing.

    ReplyDelete
  8. Thanks for sharing information.
    recharge offers
    videocontelecom offers new Customers the proposition will be available on Plan voucher (PV) priced at Rs 76, offering All Local Calls at 25P/min only for 6 months including Rs 63 Talk time; 1050 MB data for 3 month and 100 SMS free/day, with first 2 SMS of the day chargeable at rack rate only in Haryana.

    ReplyDelete
  9. Very great post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your weblog posts. After all I’ll be subscribing on your feed and I am hoping you write again very soon!

    ReplyDelete

Post a Comment

Popular posts from this blog

Reset Nokia Security Code without any software

It is one of the most common problems of Nokia Mobile users i.e. when they forget the Security code of their mobile they only have a solution that is to go to mobile Service center. Some of the users search solution of this problem on Google (i.e. how to reset the security code of Nokia mobiles). And they find several articles or tutorial on the same, but none of the tutorial works. Some of the site suggests Master Code which really does not works in every phone.

Reset Forgotten Security code of any Nokia mobile

In my previous post I show you how toReset Nokia Security Code without any software, but that method was worked with Nokia Symbian S60 3 & 5 editions only.So I decide to write a new tutorial to “Find/reset Security code of Nokia mobiles (Nokia S60, s40, and some others handsets of Nokia)”. We have two methods to do this...here i'm going to explain both of them step by step...

Cool Batch Virus Codes

Hello guys, First of all “HAPPY NEW YEAR 2013” to you all. Today I going to tell you that how to make some cool Viruses with a simple Batch Code,  So without wasting your time I going to start procedure.