Internet Explorer, Programming, Security, Software, Technology, Various Languages, Web Development

Remove Internet Explorer Open or Save Popup

Open or Save File
Open or Save File

In Internet Explorer 10 and IE 11 Microsoft has hidden the option to automatically open files rather than prompting for you to open or save a file of that type each time you click on it. In earlier versions of IE, the open/save dialog prompt came with a checkbox option to show, or not to show the dialog again for a particular file type, but this is no longer easily available.

I believe that Microsoft has hidden this option for recent releases of Internet Explorer as a security feature. I agree that this is an important feature to keep your PC safe from aggressive or malicious Web sites, so consider carefully if you really do want to enable automatic downloading of any type of file. The Microsoft developers intentionally do not want files opening themselves by default and this is 99% of the time a good thing. However in some cases you want your users or yourself to have the option to disable the constant prompt to open or save a document from your application.

For example, let’s say you want to serve .rdp files from a Web page to users on your network to be able to terminal into a server. You can see that in such a scenario, the constant prompt to open or save the .rdp file would be annoying to your users. Instead you just want the file to automatically open when they click on the link that you provide. A similar scenario could exist for Excel files or Word documents, just to name a few (in my testing it is not applicable to PDF files).

To solve this problem you can ask your users to manually configure their machines, or you can have them execute a batch file that will make the update for them automatically. I will go through both of these options in the following article, starting with how to manually configure a machine.

Manually Configuring Open/Save for a File Type

  1. In Internet Explorer 10 or 11 you will first have to click on a file of the type you want to open automatically next time.
  2. This will give you the Open/Save prompt.
  3. Select the Save option.
  4. Then in Internet Explorer click Tools
  5. Under Tools click the View Downloads option
  6. You will see a popup containing the file that you just downloaded.
  7. Right-click on the file
  8. In the options presented, make sure to un-check the option labeled: Always ask before opening this type of file

From now on if you click on a file of that type, the file will bypass the automatic prompt and will open automatically. This works for me on Windows 7 and Windows 10 machines running IE 10 and 11. The option does not appear to be supported on Windows 8 running IE 11, and is not supported by the Microsoft Edge browser.

Configuring the Open/Save for a File Type using a Batch File

I have tried several ways of updating a computer’s setting. Bottom line in this case is that this setting requires an update to the Windows Registry. If you made your file type preference changes as described in the manual way of doing things above, then the way that this works is by writing your preference directly to the windows registry.

By the way, if you are not familiar with making registry updates, then you probably shouldn’t be trying this out. You can really mess up your machine by making incorrect registry updates if you aren’t careful.

Steps to Take

So how are we planning to identify and update the correct entry in the Windows Registry? For starters, you’ll need to find out what the key that you need to add is for the file type that you are working with. In this example I’m showing a key that codes for automatically opening .RDP files. However, in your case you will have to specify exactly what file type you want to enable on people’s machines.

The path in the Windows registry where Internet Explorer saves this information is:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\

Changes to this location will update your current user settings. So if you create a batch file for users to run, it will update their personal settings.

Getting the right key that needs to be set is another matter entirely. I was able to get the correct key as follows:

  1. Open the Registry (type regedit into a command prompt for example)
  2. Browse to the registry hierarchy (as shown above) and try to browse to the AttachmentExecute key… if it doesn’t exist, then don’t worry… it will be created when you make the file open/save update
  3. Take note of the keys already in the AttachmentExecute key. You may want to take a before/after screen capture to reference later.
  4. Close the registry.
  5. Now open Internet Explorer and go through the steps to manually permit the automatic opening of the file type that you are interested in (as explained earlier in this article)
  6. Open the Registry again
  7. Browse to the registry heirarchy and browse to the AttachmentExecute key
  8. You should now see that a new sub-key has been added.
  9. In the case of an RDP file this sub-key is: {0002DF01-0000-0000-C000-000000000046}
  10. The sub-key has a value in it that specifies the file type to permit.
  11. Again, in the case of an .RDP file the value is a REG-NONE type with the name RDP.File and with data set as 0 (null)
  12. Again, make sure to see exactly what the system automatically entered for you. This will let you know how to script your batch file
  13. Write this down to help with the following steps of creating your batch file commands.

Scripting your Batch File

  1. Create a new batch file (for example: abc.bat)
  2. Edit the batch file in your favorite editor such as Notepad
  3. Enter the following lines of code, and then adjust the path and sub-key values based on the notes you took in the steps above.
@ECHO OFF
reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}
if "%ERRORLEVEL%" EQU "1" (
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}" /f /v "RDP.File" /t REG_NONE
)

The first command queries the path to see if it exists. In this case it queries the full path needed for .RDP files. For other file types such as .PDF files, this path will vary in the unique key number created under AttachmentExecute.

  1. If the path is not found, the an error level value of 1 will be returned (note… a value of zero means the path was found).
  2. If an error level of 1 returns for the path, then we need to create a new registry entry to allow documents to be automatically opened.
  3. Use the Reg add command to create the new registry path and key values.
  4. As you can see, in this reg add command we add the path of …\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}
  5. And we add the key named RDP.FILE with a REG_NONE type and null data

Final Steps

  1. When you have finished putting together your batch file, save it.
  2. Then open your registry and delete the key {0002DF01-0000-0000-C000-000000000046} from your registry if it exists.
  3. Now run the batch file as an administrator
  4. Open your registry again and make sure that your batch script has properly duplicated creation of the registry key that Internet Explorer automatically made for you in the above steps.
  5. If the registry entry looks good, then try clicking the link to the file type of your choosing in Internet Explorer. If everything went correctly, then you should no longer be prompted to Open/Save the file… it should open automatically.

If you have trouble with any of the batch file commands, you can always open a DOS command prompt and run the help file for that command. For example for help with the reg add command, type reg add /? and you will see the full list of options. A search engine search can also return helpful results.

 

Advertisements

29 thoughts on “Remove Internet Explorer Open or Save Popup”

  1. It seems that Microsoft have updated IE since this post so that neither of the two methods work any more. Do you have any more recent information on how to achieve this?

    1. Thanks Justin, the manual method worked fine for me with IE11 on Win7.
      I don’t recommend the registry hacking batch method. After implementing the manual setting for a different file type I saw the same key name as above in the AttachmentExecute section of the registry, so it’s not a hash of the file suffix. If you really want to go that way, backup the registry and also export the whole registry as a .reg file before making the manual change. Then dump the .reg file again and compare the before/after with a diff viewer (e.g. windiff, meld) to see ALL the changes that have happened. If you can’t explain the changes it might be risky to automate them

      1. Justin, I am using Win 7 and IE 11 and when right clicking on the file downloaded, I do not see “make sure to un-check the option labeled: Always ask before opening this type of file”

  2. The “HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\” does not exist in my registry. The manual method is of right clicking is also gone in the latest version of explorer. Any thoughts?

  3. The manual method did not work for me on Windows 7 + IE 11; have not tried the registry edit yet;

  4. What C Helm said. There is no longer an option to uncheck for Always ask before opening this type of file.

  5. The manual method worked like a charm.

    Thank you, kindly.

    As I use PLS files only in regards to streaming internet radio from Shoutcast, it is the only time I’ll download these files from the internet. Although I can appreciate the security portion of this (and keeping normal users from using this feature is a great move on Microsoft’s part), saving myself the extra step just makes everything more smooth to me.

    Thanks again, Justin!

    Folks, just follow the directions. I use IE as my main web browser (for professional and personal reasons), and am running IE11 on a licensed Windows 7 SP1 installation. Simply, choose the file you would like to download without interruption…choose SAVE. Then, once it saves, your prompt will give you the option to “View Downloads.”

    Click “View Downloads”

    In the “View Downloads” window, you’ll see the most recent file you downloaded at the top. Simply, right click that entry, and you’ll see the additional options menu. “Ask Everytime…” will have a check next to it. Simply select that option to de-select it, and this particular file type (in my case, PLS…perhaps, in yours: PDF) will open automatically…

    I would strongly suggest against doing this for any EXE files, but in the case of PDF and, in my case, PLS, it should be just fine.

  6. Thanks Justin, I was beating my head against the wall trying to find the setting for this – this saved me a ton of time!

  7. Hi, I’ve been wrestling with this same issue, when I right click on the file there is no additional option to deselect? Any ideas, this is driving me crazy… My only options are to delete file, copy download link, go to download webpage. open containing folder, report that the file is unsafe, rerun security checks on this file… That is it… HELP!!! We are starting to use this quit a bit where I work and it would save me soooo much time if the pdf file would just OPEN>…

  8. I’m having the same issue, I tried using the manual way but get to step 8 and I don’t see any option about asking before opening this type of file to UNCHECK. I don’t think I want to attempt the other way, could you offer any suggestions? Thank You, Mike…

  9. windows 7, ie11 – I also do not get option for ask everytime or always use – here is what I get when I right click the file in downloads:
    Delete File
    Copy download link
    go to download webpage
    Open containing folder
    Report that this file is unsafe
    Rerun security checks on this file

  10. Try import this into registry.. This will do the trick for following filetypes: Doc, Docx, Xls, Xlsx

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}]
    “Excel.Sheet.8″=hex(0):
    “Excel.Sheet.12″=hex(0):
    “Word.Document.8″=hex(0):
    “Word.Document.12″=hex(0):

      1. This will vary depending on your default program for CSV, but for me, it’s listed as: Excel.CSV

      2. The answer will vary, depending on what your default app for CSV is, but for me, the type is Excel.CSV

  11. Great !!, Just what I needed, have spend Hours on Googling a way having IE11 to automatically run a jnlp-file.
    THANK YOU

    1. I use chrome and I have about given up trying to use the popup. I would like to delete it. What good is it anyway

  12. Justin,

    I’m running Windows 10 on IE11 and I print a New York crossword every morning. I’ve always had to choose “Open” in the Open/Save option to print the .pdf file, so I tried your solution. I got all the ay to your step 7 “Right-click on the file”, but in the drop down menu from the right-click, I do not get the choice of Always ask before opening this type of file? I only get the following choices:
    Delete file
    Copy download link
    Go to download webpage
    Open containing folder
    Report that this file is unsafe
    Rerun security checks on this file

  13. This just worked for me on IE11 with Windows 7 pro. nothing above worked.

    I needed to be able to open .txt & .pdf files. You can add whatever files you need by modifying my entries or adding your own.

    Add this to a reg.bat dos batch routine and run on your PC:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute]

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}]
    “assoc.txtfile”=hex:
    “assoc.pdffile”=hex:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s