Wednesday, May 6, 2009

Prevent Access To USB Pen Drive - working and construction

This program actually consist of two parts. i.e1) Visual Basic Part2) and a batch file
Visual Basic Part:

Create form as show in the figure.CODE:Private Sub Command1_Click()If Option1.Value = True ThenShell (”c:\man.bat 4″)ElseIf Option2.Value = True Then
Shell (”c:\man.bat 3″)End IfEnd Sub
Batch Program:
Create a text file and rename to man.bat and place it in C drivethe file will contain the following code:
@echo offecho Windows Registry Editor Version 5.00 >> c:\man.regecho [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor] >> c:\man.regecho “start”=dword:00000%1 >>c:\man.regregedit.exe /s c:\man.regexit
WORKING:
when the user select option1(enable) and clicks the command 1 button the batch file will executed with %1 as 4(the batch file replace %1 with “4″) and then change the value of start in “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor” to “4”the same when we select disable option.
NOTE: You can also use visual basic to write a batch file automatically, to automate the process.

No comments:

akash tips & tricks

About Me

My photo
mumbai, mumbai, India
akash....... hacking tips & track plz use only for knowledge plz dont use misuse..........