The Tech Diary of an IT support geek

  • Home
  • Android
  • iOS
  • Mobile
  • PC
  • Tips
  • Contact US
Home » A Program to Disable USB Ports?

A Program to Disable USB Ports?

In this post, I will show how to create a simple program that disables the USB ports on the computer (PC). As usual, I am using my favorite C programming language to create this program . Anyone with a basic knowledge of C language should be able to understand the working of this program.

Once this program is executed it will immediately disable all the USB ports on the computer. As a result you’ll will not be able to use your pen drive or any other USB peripheral devices on the computer. The source code for this program is available for download. You can test this program on your own computer without any worries since I have also given a program to re-enable all the USB ports.

  1. Download the source code of the program program on to your computer from the following link:

    Download the USB_Block.rar [download id=”254″]

    The download contains the following 2 files:

    • block_usb.c (source code)
    • unblock_usb.c (source code)

  2. You need to compile them before you can run it. A step-by-step procedure to compile C programs is given in my post – How to Compile C Programs.3. Upon compilation of block_usb.c you get block_usb.exe which is a simple program that will block (disable) all the USB ports on the computer upon execution (double click).
  3. To test this program , just run the block_usb.exe file and insert a USB pen drive (thumb drive). Now you can see that your pen drive will never get detected. To re-enable the USB ports just run theunblock_usb.exe  (you need to compile unblock_usb.c) file. Now insert the pen drive and it should get detected.
  4. You can also change the icon of this file to make it look like a legitimate program. For more details on this refer my post – How to Change the ICON of an EXE file  (This step is also optional).

How it Works?

The idea behind the working of this program is pretty straightforward. It works by gaining access to the Windows registry and modifying its settings to disable the USB device support on the computer.

On the other hand, the other program will re-set the registry settings back to the normal so that the support for USB devices is re-enabled. I hope you like this post. Please pass your comments.

  • Facebook
  • Twitter
  • LinkedIn
  • WhatsApp
  • Reddit

Related

Posted by Obasi Miracle on this date: Leave a Comment Tagged With: Computer
Shortlink:

Sign Up in Seconds

Join us to get latest posts (ONLY) delivered to your inbox. No Spam, We Promise!

About Obasi Miracle

I am a dedicated web developer with interest in blogging and app development. I have lots of buddies and always ready to connect with like-minded pals - See more about me.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Next PostHow to Bypass Right Click Block on Any Website?
Previous PostHow to Compile C Programs?

RSS Inside: 3rd Planet Techies

  • 15 Best Android Auto Apps For Your Car In 2023
  • 12 Best Truck Simulator Games For Android And iOS
  • Full List Of Cars With An S Logo
  • Usability vs. User Acceptance: What are the Differences Between UI and UA Testing?

Sign Up in Seconds

Join us to get latest posts (ONLY) delivered to your inbox. No Spam, We Promise!


Recent Posts

  • Full List Of Cars With An S Logo [3ptechies]
  • Factors to Consider When Searching for the Best Mobile Phone Plans
  • Do Battery Savers Work? Can They Really Extend Battery Life?
  • Why Does Phone Keep Turning Off Itself and 9 Ways to Fix It

Looking For?

mtn cheat for android, how to transfer data on etisalat, how to share data on airtel, How to share data on etisalat, mtn free browsing cheat for android phones, how to transfer mb on etisalat, mtn mb cheat for android, mtn free browsing on android, how to transfer data on airtel, latest mtn cheat for android, mtn free browsing cheat codes with unlimited data downloads, how to share airtel data, mtn cheat code for android, best airtel tariff plan for browsing, 2go for windows phone, sharemobile ro, how to transfer etisalat data, mtn cheats for android, etisalat data transfer, airtel data share
© 2022. The Tech Diary of an IT support geek. Privacy Policy