How does one prevent a USB drive from autorunning when inserted into a USB port?
How does one prevent a USB drive from autorunning when inserted into a USB port?
Tell your OS what to do under particular circumstances…
furious said:
- How does one prevent a USB drive from autorunning when inserted into a USB port?
Tell your OS what to do under particular circumstances…
I shout at the computer and it doesn’t listen.
I can’t check now but there is usually an option to “do nothing” and “always”…
furious said:
- I shout at the computer and it doesn’t listen.
I can’t check now but there is usually an option to “do nothing” and “always”…
Ok, you’re assuming that it brings up “that” dialogue box.
The problem is that I have a USB drive that might be infected and I need to access files on that drive. I need to ensure that the drive cannot autorun, and there is no room for trial & error.
KJW said:
furious said:
- How does one prevent a USB drive from autorunning when inserted into a USB port?
Tell your OS what to do under particular circumstances…
I shout at the computer and it doesn’t listen.
Shout louder, it could be wearing a towel.
KJW said:
How does one prevent a USB drive from autorunning when inserted into a USB port?
if autorun preferences does not appeal
you can buy usb ports with individual on off switches like this one
7-Port USB 3.0 HUB Individual Switch AU Plug Adapter High Speed 5Gbps SAA
http://www.ebay.com.au/itm/7-Port-USB-3-0-HUB-Individual-Switch-AU-Plug-Adapter-High-Speed-5Gbps-SAA-/391717532810?hash=item5b342f348a:g:9NgAAOSwWxNYvl-J
There is also a way to set it prior to inserting the USB. Unfortunately, being unfamiliar with your system, I can’t advise further…
Tau.Neutrino said:
KJW said:
How does one prevent a USB drive from autorunning when inserted into a USB port?
if autorun preferences does not appeal
you can buy usb ports with individual on off switches like this one
7-Port USB 3.0 HUB Individual Switch AU Plug Adapter High Speed 5Gbps SAA
http://www.ebay.com.au/itm/7-Port-USB-3-0-HUB-Individual-Switch-AU-Plug-Adapter-High-Speed-5Gbps-SAA-/391717532810?hash=item5b342f348a:g:9NgAAOSwWxNYvl-J
Switching off a USB port doesn’t help me, or are you saying that the switch is for disabling autorun?
Plug in another usb drive and has others have said set the auto run preferences to do nothing.
Configure AutoPlay in Windows
https://www.winhelp.us/configure-autoplay-in-windows.html
furious said:
- Ok, you’re assuming that it brings up “that” dialogue box.
There is also a way to set it prior to inserting the USB. Unfortunately, being unfamiliar with your system, I can’t advise further…
I should mention that the OS is Windows 7.
furious said:
- Ok, you’re assuming that it brings up “that” dialogue box.
There is also a way to set it prior to inserting the USB. Unfortunately, being unfamiliar with your system, I can’t advise further…
Super Cheap Auto have a rather expensive product called Stop Ya Bastard, it’s targeted at engine tinkerers.
It says nothing on the can about not using it on computer USB ports so it might be worth a try.
Disclaimer
PWM or any PWM incorporated entities or affiliates takes no responsibilities for injury or injury to devices that may emanate from online advice.
PWM’s legal team will vigorously defend any litigation arising from advice given in good faith.
KJW said:
How does one prevent a USB drive from autorunning when inserted into a USB port?
Good question. The appropriate command ought to be accessible from the Control Panel.
If not there then there’s sure to be something in the registry (accessible through regedit).
Try this first.
Mine is a Windows 7 machine but there ought to be something similar on other versions of Windows.
Open Control Panel and go to “Autoplay”
On the Autoplay menu there are a whole series of options for allowing and blocking autoplay on CDs, DVDs, Software and Games, Pictures, Video Files, Audio files etc.
Play with the options there, I don’t see anything on that menu that specifically mentions USB but try it out and it might work.
Configuring Autorun / Autoplay
https://www.winhelp.us/configure-autoplay-in-windows.html
mollwollfumble said:
KJW said:
How does one prevent a USB drive from autorunning when inserted into a USB port?
Good question. The appropriate command ought to be accessible from the Control Panel.
If not there then there’s sure to be something in the registry (accessible through regedit).Try this first.
Mine is a Windows 7 machine but there ought to be something similar on other versions of Windows.
Open Control Panel and go to “Autoplay”
On the Autoplay menu there are a whole series of options for allowing and blocking autoplay on CDs, DVDs, Software and Games, Pictures, Video Files, Audio files etc.
Play with the options there, I don’t see anything on that menu that specifically mentions USB but try it out and it might work.
PS, thanks for asking this question, now I know why dropbox was interfering with my uploads from the digital camera. I changed three of the autoplay options to block dropbox from opening automatically.
i notice win 7 has this

Tau.Neutrino said:
Configure AutoPlay in Windows
https://www.winhelp.us/configure-autoplay-in-windows.html
This doesn’t mention USB drives. I actually had already set my CD/DVD drives not to autoplay inserted discs, but I don’t trust that this would stop a malicious attack that exploits autorun on USB drives.
What do you have to do to determine if the USB is threat free?
How about going to your local Officeworks and using the USB on their computers?
One other thing that I want is to setup a USB drive so that it does visibly autorun some program. I can use this to test whether disabling autorun has worked.
KJW said:
Tau.Neutrino said:
Configure AutoPlay in Windows
https://www.winhelp.us/configure-autoplay-in-windows.html
This doesn’t mention USB drives. I actually had already set my CD/DVD drives not to autoplay inserted discs, but I don’t trust that this would stop a malicious attack that exploits autorun on USB drives.
I can understand that.
mollwollfumble said:
KJW said:
Tau.Neutrino said:
Configure AutoPlay in Windows
https://www.winhelp.us/configure-autoplay-in-windows.html
This doesn’t mention USB drives. I actually had already set my CD/DVD drives not to autoplay inserted discs, but I don’t trust that this would stop a malicious attack that exploits autorun on USB drives.
I can understand that.
last virus program, might’ve been AVG, reckon had option to scan when inserted
KJW said:
Tau.Neutrino said:
Configure AutoPlay in Windows
https://www.winhelp.us/configure-autoplay-in-windows.html
This doesn’t mention USB drives. I actually had already set my CD/DVD drives not to autoplay inserted discs, but I don’t trust that this would stop a malicious attack that exploits autorun on USB drives.
I can understand that. I think that USB autoplay is included under the tab “software and games”.
To feel safer, disable the Autorun by editing the registry with regedit. This website explains how, look further down page for “regedit”.
https://support.microsoft.com/en-au/help/967715/how-to-disable-the-autorun-functionality-in-windows
Witty Rejoinder said:
What do you have to do to determine if the USB is threat free?
The likelihood of there being a threat is quite low, but the threat would be very destructive if it did exist. Yes, it is a threat that is known to me, though I don’t know if it affected the USB drive that I need to use. From my understanding of the threat, it is unlikely, but I need a guarantee.
I would consider the USB drive to be threat free if it does not autorun when inserted into a USB port.
KJW said:
One other thing that I want is to setup a USB drive so that it does visibly autorun some program. I can use this to test whether disabling autorun has worked.
There are several good links from there. Or you can write your own four line Autorun.inf that runs any program of your choice as a test.

The sourceforge link also contains downloadable programs for blocking USB autoplay, but I wouldn’t trust them.
mollwollfumble said:
KJW said:
One other thing that I want is to setup a USB drive so that it does visibly autorun some program. I can use this to test whether disabling autorun has worked.
Google “autorun.inf for usb download”.There are several good links from there. Or you can write your own four line Autorun.inf that runs any program of your choice as a test.
The sourceforge link also contains downloadable programs for blocking USB autoplay, but I wouldn’t trust them.
Thanks. I was aware of the autorun.inf file, though I don’t fully know how to use it. Also, is this the only way to autorun a USB drive? In other words, are there other covert ways to autorun code on a USB drive?
i’m sure there’s always the risk of some zero-day vulnerability
mollwollfumble said:
To feel safer, disable the Autorun by editing the registry with regedit. This website explains how, look further down page for “regedit”.
https://support.microsoft.com/en-au/help/967715/how-to-disable-the-autorun-functionality-in-windows
I was hoping I wouldn’t have to edit the registry.
It seems wrong to me that doing something about basic security requires something so esoteric.
KJW said:
mollwollfumble said:
To feel safer, disable the Autorun by editing the registry with regedit. This website explains how, look further down page for “regedit”.
https://support.microsoft.com/en-au/help/967715/how-to-disable-the-autorun-functionality-in-windows
I was hoping I wouldn’t have to edit the registry.
It seems wrong to me that doing something about basic security requires something so esoteric.
at least it’s still a couple of steps that are possible
my iOS device in my other hand…
SCIENCE said:
KJW said:
mollwollfumble said:
To feel safer, disable the Autorun by editing the registry with regedit. This website explains how, look further down page for “regedit”.
https://support.microsoft.com/en-au/help/967715/how-to-disable-the-autorun-functionality-in-windows
I was hoping I wouldn’t have to edit the registry.
It seems wrong to me that doing something about basic security requires something so esoteric.
at least it’s still a couple of steps that are possible
my iOS device in my other hand…
Morning all
In Win 10 Start, Settings, Devices, Autoplay. Then either All media & devices, Off or Removable drive, choose default then click what you want.
Holding down the shift key while inserting a disc stops autorun from running programs on CDs; I suspect (but haven’t checked, because I haven’t got a windows box) it’ll work the same with USB sticks.
KJW said:
furious said:
- I shout at the computer and it doesn’t listen.
I can’t check now but there is usually an option to “do nothing” and “always”…
Ok, you’re assuming that it brings up “that” dialogue box.
The problem is that I have a USB drive that might be infected and I need to access files on that drive. I need to ensure that the drive cannot autorun, and there is no room for trial & error.
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
fsm said:
KJW said:
furious said:
- I shout at the computer and it doesn’t listen.
I can’t check now but there is usually an option to “do nothing” and “always”…
Ok, you’re assuming that it brings up “that” dialogue box.
The problem is that I have a USB drive that might be infected and I need to access files on that drive. I need to ensure that the drive cannot autorun, and there is no room for trial & error.
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
how do you plug a physical USB stick into a virtual machine. unless you’re running a hypervisor then the host OS would still pass through the USB and therefore still be liable to infection, I would have thought.
Boot the system from a live Linux cd, and plug the USB stick in that. Linux will have full access to the USB stick, and it won’t run anything compiled for Windows.
Dropbear said:
fsm said:
KJW said:Ok, you’re assuming that it brings up “that” dialogue box.
The problem is that I have a USB drive that might be infected and I need to access files on that drive. I need to ensure that the drive cannot autorun, and there is no room for trial & error.
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
how do you plug a physical USB stick into a virtual machine. unless you’re running a hypervisor then the host OS would still pass through the USB and therefore still be liable to infection, I would have thought.
>> unless you’re running a hypervisor

btm said:
Boot the system from a live Linux cd, and plug the USB stick in that. Linux will have full access to the USB stick, and it won’t run anything compiled for Windows.
a good idea, if it has drivers that can read that type of file system
A usb device can only connect to one system at a time. If you plugin a usb device while you are inside the VM then it cannot affect the host system.
fsm said:
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
This seems like a rather extreme solution.
KJW said:
fsm said:
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
This seems like a rather extreme solution.
The normal advice of this forum is “nuke it from orbit”, so I think this is quite mild.
You could just use a live disk…
Only after WB&D fails…
After doing some investigation of the autorun.inf file, I discovered that Windows 7 (and above) only accepts the label and icon keys in the autorun section for all drive types, except DRIVE_CDROM. Thus, it would seem that Windows 7 won’t autorun a flash drive regardless of any autorun.inf file.
KJW said:
fsm said:
Setup a Linux virtual machine (VM) on your computer and then plug the USB stick into that. A virus or other malware that might run inside a VM cannot affect the host computer. If a VM does get infected or broken it is a simple process to delete it with no effect on your computer. You can download VMware for free and then grab an ISO of your desired version of Linux (Ubuntu, & Mint are both very good). Linux will ignore Windows permissions and give you access to all files on a drive.
This seems like a rather extreme solution.
This is actually a very simple and useful solution. Using a distro like Linux Mint gives you a very ‘Windows’ experience. You don’t need to know any complicated command line stuff to use Mint. You will get access to the huge range of Linux software that is available. Setting up VMware and installing an iso is also very simple. You can install as many virtual systems as you like, multiple versions of Windows or Linux. You can also easily delete these systems if you wish without any affect on your primary system. The virtual machines run inside a window, just like any other program. You don’t need to ‘dual boot’. Give it a try. You might just find it very handy for a variety of tasks.
Get VMware player here:
https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0|PLAYER-1254|product_downloads
Get Mint here: (scroll down and find an Australian server)
https://linuxmint.com/edition.php?id=226