The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
Normally, we have to go to control panel to enable or disable USB port. But C programming allow one to either enable or disable their USB port just by compiling the following c program.
Here is the c program to disable your USB port.
#include <stdio.h> #include <stdlib.h> int main() { system( "reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f" ); return 0; }
Here is the C program to Enable your USB port
#include <stdio.h> #include <stdlib.h> int main() { system( "reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f" ); return 0; }
For security reason it won't work in windows 7 or later.
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019