Is there any way to make a file automatically run when USB or hard drive is plugged to a computer?
I have tried with the autorun.inf file, but the function has been removed in win 7 and 8.
Is there any way to make a file automatically run when USB or hard drive is plugged to a computer?
I have tried with the autorun.inf file, but the function has been removed in win 7 and 8.
Microsoft has disabled this feature by default on 'non-optical drives' from Windows 7 and onward in order to reduce chances of malware being run. This was replaced with the 'AutoPlay' prompt, which asks the user what they would like to do before executing any applications.
A common malware attack against businesses is to leave a USB drive where an unsuspecting employee will find it. Usually curiosity gets the better of the employee and they insert the newly-found USB drive into their company computer to "see whats on it". If the computer allows any program to run when the drive is mounted (as autorun.inf used to allow) then a virus can execute immediately without any further user input.
Here's some more in-depth reading on the subject - http://blogs.technet.com/b/srd/archive/2009/04/28/autorun-changes-in-windows-7.aspx