How can “Install or run program from your media” be disabled?

8

1

Recently something in Windows 7 has changed such that the default action for removable drives has become Install or run program from your media instead of Open.

I checked the AutoPlay control panel applet and everything is set to Take no action (in fact, the master check-box Use AutoPlay for all media and devices is cleared as well).

I also searched through the CLSID key in the register and could not find it in any of the Shell keys, so I figure it must be in one of the ShellEx keys.

Finally, I searched for information on this, but found nothing on how to disable (or better yet, remove) that option and revert the default action to Open.

Synetech

Posted 2011-09-15T03:32:28.933

Reputation: 63 242

Answers

4

I found the solution by deleting the following registry key (where X is the letter assigned to the volume in question):

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\X

Don Apis

Posted 2011-09-15T03:32:28.933

Reputation: 41

Yeah, I got this:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\F\shell\AutoRun\command @="F:\AutoRun.exe"

and

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\F_Autorun\DefaultIcon @="F:\Signal.ico"

So my guess is it's some weird wifi/3G driver or something. – Mark – 2014-12-21T16:52:55.233

The registry key creation date matches the date I installed drivers for a Huawei "3 USB Modem", so if you've done the same just delete the whole key for that drive. – Mark – 2014-12-21T17:06:17.907

Hmm, I’m not sure that should be the cause (maybe a side-effect of some other underlying issue), but next time I see it happen, I’ll give it a shot. – Synetech – 2013-03-30T14:16:16.427

1

Similar to DiableNoir's advice, if that didn't work out for you, please try the following:

  • Open the Run dialog (Windows key + R), and type gpedit.msc

The Local Group Policy Editor appears.

  • In the left Pane, Expand Computer Configuration
  • Expand Administrative Templates, under Computer Configuration
  • Expand Windows Components under Administrative Templates
  • Click AutoPlay Policies

In the AutoPlay Policies pane:

  • Double-click the Set the default behavior for AutoRun list option
  • In the corresponding dialog that appears, on the left, click the Enable button
  • Down the bottom of that window, under Options, select Do not execute any autorun commands from the dropdown menu.
  • Click OK.

Restart your computer.

Arrow

Posted 2011-09-15T03:32:28.933

Reputation: 121

There is no group-policy editor in Home. And like I said, AutoPlay is already set to do nothing. – Synetech – 2012-07-27T13:20:57.977

In "Home". You're looking in the wrong place, then. – Arrow – 2012-08-01T18:02:43.940

1

I've seen such problems yet. I've tried your listed methods, and without result.

The shortest way was to run Kaspersky Internet Security and start "Vulnerability Scan".
It found that 'autoplays' of CD/DVD, USB drive, HDD and network disks are enabled and disabled them.

Jet

Posted 2011-09-15T03:32:28.933

Reputation: 2 232

1

Then yours was a basic handler and you could have simply used Autoruns. The problem is when the item isn’t a basic handler. There are at least half a dozen places where context-menu items can be registered, so finding out where the heck this item is coming from can be a headache.

– Synetech – 2013-02-08T23:39:57.290

1I know what are you talking about. I'd almost the same problem on another PC. And also I tried all Sysinternals' tools. But this helped me then. Maybe it'll help you too... – Jet – 2013-02-09T23:55:18.963

Thanks, but I’m not about to install Kaspersky just to do what can/should be done by just deleting a registry key. Are you sure yours was actually the Install or run program from your media menu item and not something else? – Synetech – 2013-02-10T04:04:25.757

1Yes... Also check your drives for viruses, because there're some viruses like that. Delete Autorun.inf-s in that drive and create a FOLDER named Autorun.inf in that drive. This will prevent a virus from creating autorun.inf. It can help you too. – Jet – 2013-02-10T09:58:56.177

But autoruns.inf and viruses have nothing to do with the menu entry, it’s part of Windows; something is triggering its use. The folder tip is good though; in fact, ~8 years ago I did exactly that to stop a program from constantly creating and accessing a file in c:\windows. It was really stupid and annoying, so I made a folder with the same name and set it to read-only, system, and hidden. The program could no longer create or access the file. (Of course it’s not difficult for a program to clear the attributes and delete the existing object, but most tend not to, so it’s worth doing.) – Synetech – 2013-02-11T00:53:38.147

0

NONE of this worked for me. What I did instead was regedit search for "Install or run program from your media, and then regedit found two instances of that in Mountpoints2 as mentioned above.

Next for each CLSID (sp?) I deleted the "Autorun" folder-looking entry.

This made the default action change to OPEN immediately (no logout or reboot needed).

EDIT: I should add that after doing the above, my problem came back again. I found out that a disc emulation app, Daemon Tools, was creating this registry entry again with each new run or mount of a disc image, whichever the case.

I then went into Control Panel | Autoplay and toggled everything off again, uncheckmarked "Use AntoPLay for all media and devices, and changed some drive (volume) letter assignments so they weren't being swapped back and forth every time I put some new media in, USB flash drives for example.

dave

Posted 2011-09-15T03:32:28.933

Reputation: 1

0

Just delete this registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers

This will reset all Autoplay settings for all media. You should now be able to change the settings. The dialog control panel / Default Programs should create a new key. (So it's safe to delete that key.)

Please note that administrators can create policies which deactivate Autolplay. If you are using the Professional/Ultimate/Enterprsie-Edtion of Windows and your are a administrator, you should also check the Local Policies:

Autploay Group Policy

DiableNoir

Posted 2011-09-15T03:32:28.933

Reputation: 858

I can’t test this right now because I’m not experiencing the problem anymore for some reason (that registry branch is present). Either way, I don’t think it’s an Autoplay issue, or at least should not need to use a scorched-Earth fix like that. I just need to figure out where that string is coming from. – Synetech – 2011-10-15T21:15:46.483

I'm sure that your problem is a result of a broken AutoPlay-Key. Please delete that key and let Windows create a new one, before trying other solutions. You will never find the string because it's part of the Shell32.dll and not of the registry. – DiableNoir – 2011-10-16T16:13:47.820

Except that I don’t have the problem right now. It comes and goes for some unknown reason. Again, I don’t believe it has anything to do with Autoplay; it is an incorrect handler. It doesn’t matter if the string is a resource in shell32.dll, there should still be some kind of connection in the registry (eg, a shellex key that points to shell32.dll). – Synetech – 2011-10-16T17:58:55.450

I think the key already contains the connection to the shell32.dll and Windows Explorer. It defines for all storage types the values MSOpenFolder, MSAutorun,... But, every program is can edit this values because the key is saved under HKEY_CURRENT_USER. I think there is a application on your computer which chances this settings. – DiableNoir – 2011-10-17T13:15:43.400

Okay, I just got it again today with a new device (which makes me suspect that it is a default setting with new devices and does not happen once you set the action for devices that Windows has seen before). Any, I tried your suggestions, but they did not work. :-( – Synetech – 2011-12-10T23:36:49.073

0

I also faced this problem and could not find any solution for this problem online.

Here is the way I got it corrected. Since I believe this problem is associated with drive letter of USB, changing the drive letter should help. Follow these steps :

  1. Connect USB and go to disk management (right click computer - > manage -> Disk management under storage group)
  2. Right click on USB drive letter and select "Change Drive Letter and Paths.."
  3. Click on change - > select other drive name except which you already had
  4. Click Ok
  5. Yes for the warning

Boom !! Try your USB, error resolved ...!

PS : If you want to use your USB for any electronic media(TV, Car music etc.), make sure that format of pendrive is NTFS.

Saajan

Posted 2011-09-15T03:32:28.933

Reputation: 1

0

I found the problem was to do with the 'Shell Hardware Detection' Service.

It was disabled on a Server I had issues with. no need to change registry or anything. As soon as i enabled and started the service, the default option was 'Open'.

Dave

Posted 2011-09-15T03:32:28.933

Reputation: 1