When you insert an USB memory device as a USB pen drive or external hard drive, Windows 7 automatically detects it. If you do not want anyone using the machine to use data stored on a USB device, there is a way to disable USB storage recognition.
Click “Start“, then type “regedit” (without the quotation marks) in the search field and hit Enter and accept the security prompt:

Windows registry editor will open. Go to the key: HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > USBSTOR
---

In the right pane, change the DWORD value named “Start” and set its value “4” (default value is “3”); just double clicking the DWORD value will provoke a window and allow you to make the change:

Finally, you must restart Windows 7 to apply the change.
We have made ready made registry files so that, you can Enable / Disable auto detection of USB storage devices in Windows 7 by just double clicking them.
Download the file by clicking here
After you unzip the compressed folder, you will get 4 files inside; one is link to this website, second one a read me file and (most importantly) two registry files:

To Disable your Windows 7 to auto detect any usb mass storage device, simply double click Disable usb drive recognition registy file.
To Enable your Windows 7 to auto detect any usb mass storage device (Default), simply double click Enable usb drive recognition registy file.
Tagged With usb flash drive not working windows 10 , usb flash drive not recognized windows 7 , usb thumb drive not detected windows 7 , disalbe auto detect usb , How to disable USB connection detection in windows PC , disable auto usb detection , desiable detection of new devices to usb in windows 7 , can you identify a USB drive without external marks , windows: enable drive autodetect , auto recognition of usb drive
sir thank u
thanks for your valuable guide line this will help a lot.
sir, i have another problem that is, where i m working are having Dot matrix printer, but the problem is that the new PC does not having LPT Port(paralleled printer Port), alternately we purchased USB virtual printer port but it is not recognized by the PC. Please help me.
Once again thank u.
Welcome Mr. Dilip. LPT Port is by default absent now for most PCs. If you have used a NET USE command to set LPT1 to the printer and changed the printer port to be the USB Virtual port, it might not work. I am not sure whether you have already used this method.
Another better option may be to add a true parallel port using a PCI adapter card.