Reading Time: 6 minutes, 48 secs

Internet Explorer: Disable “Do you want to open or save this file?” download prompt

Recently I was asked to disable the “Do you want to open this file?” or “Do you want to open or save this file?” prompt in Internet Explorer for all InfoPath Template files (.xsn). Let me tell you it wasn’t easy to workout the solution, even though the actual solution is pretty easy.

Background Information

At work our intranet is hosted on in SharePoint 2010 environment. On the intranet our dev guys have developed a number of interactive InfoPath forms that users can use to complete a number of requests such as log an IT Service Desk job, etc. The problem is every time they click the link to access the form, the default behaviour of Internet Explorer is to download the file and then prompt if you want to open it or save it. This is really annoying for clients and pretty much we would like to provide them with a seamless experience when using the intranet service.

Prompt Variations

Depending on the version of Internet Explorer, this prompt can have slight variations such as:

Internet Explorer 8

“Do you want to open this file?”

IE8 Do you want to open this file Internet Explorer: Disable Do you want to open or save this file? download prompt

Internet Explorer 9

“Do you want to open or save this file?”

IE9 Do you want to open or save this file Internet Explorer: Disable Do you want to open or save this file? download prompt

Internet Explorer 10

“Do you want to open or save this file?”

IE10 Do you want to open or save this file Internet Explorer: Disable Do you want to open or save this file? download prompt

No matter what the prompt looks like or is saying… it is still annoying if you constantly using an intranet based form? So if possible…. lets disable it.

Isn’t this a security risk?

I realise the reason why Microsoft cause this prompt to appear in Internet Explorer is because it prevents malicious applications, programs, etc from automatically downloading and running on a machine without any user intervention. So therefore, the logical question is… won’t disabling this become significant security risk which outweighs users clicking the Open button?

Well, the good news is we are not actually disabling the prompt from appearing for all downloaded files, we are only going to be disabling the prompt for a certain file type – in my case InfoPath Templates (.xsn) files.

You could argue that this could be introducing a security loophole in which potentially malicious InfoPath files from the internet could be downloaded and executed on a user’s machine without their prior consent. The way I see it, yes this is the case but honestly there isn’t that many InfoPath forms on the internet to begin with (I haven’t ever come across any), nor do they usually carry malicious code. In addition, we have a anti-virus and anti-malware solution actively running and scanning all client computers, so these two points mitigate the risk enough in my opinion for this risk not to be an issue at all. Not only that, the change and its associated risk has been documented and approved via our CAB process.

In your case, you will need to evaluate risk vs reward and determine what is an acceptable level of risk for your environment. This post merely explains how to technically solve the problem and doesn’t necessarily take into consideration the risk associated with that change.

In saying that however, the Internet Explorer 8 (Do you want to open this file?) prompt actually allows users to essentially disable the prompt for that particular file type by un-ticking the “Always ask before opening this type of file” check-box at the bottom of the prompt. IE 9 and 10 have now removed this option and hence strengthened security in a way, even though it is still possible to get around it as per the solution below.

How to disable the “do you want to open or save this file?” prompt

The following solution is for InfoPath Template files. If you want to use another file type you will need to tweak this solution:

  1. Launch Registry Editor (Start >> Run >> regedit.exe)
  2. Expand HKEY_CURRENT_USER
  3. Navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell
  4. If it doesn’t exist, create the AttachmentExecute key
  5. Create the {0002DF01-0000-0000-C000-000000000046} key
  6. Create a new Binary Value with the Name InfoPath.Solution.3
  7. Re-launch IE and test – should be now working ok

What version of InfoPath are you running?

You might not thing this is important, but actually it is. Depending on the version of InfoPath (or Office) you are running slightly can change step 6 above:

Office 2010 or InfoPath 2010

If you are using Office 2010, then step 6 above is correct. You should be using InfoPath.Solution.3 as the value name

Office 2013 or InfoPath 2013

If you are using Office 2013, then step 6 needs to change. You should be using InfoPath.Solution.4 as the value name. Note the change from 3 to 4. If you do not do this, you will continue to get prompted.

How to deploy this solution to all users?

If you need to deploy this to a number of users then the best bet (and is the way I have done it) is to deploy it using Group Policy Preferences. Not only does this give you a really easy way to deploy HKCU keys but it also allows you to control what users you want to deploy it via either security filtering on the GPO or via Item-Level Targeting on the Group Policy Preference itself.

How to disable the prompt for other file types

If you want to use this solution for another file types other than InfoPath Templates, then I think the easiest way to find the correct registry value you need to create is by simply opening the required file type in Internet Explorer 8 and then un-ticking the “Always ask before opening this type of file” check-box at the bottom of the prompt.

Once you have done this, launch Registry Editor and navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ AttachmentExecute \ {0002DF01-0000-0000-C000-000000000046}. Have a look at what IE has set the registry value name to…. this will be your solution. All you need to do now is deploy to your users via Group Policy or whatever other mechanism and there you have it.

Update 07.06.2014:

Based on a comment from a fellow reader below (jputnam) there is another way to find the correct registry value for a specific application.

You can do this by doing the following:

  1. Launch Registry Editor (Start >> Run >> regedit.exe)
  2. Expand HKEY_CLASSES_ROOT
  3. Find the extension of the file you want to automatically open (e.g. .doc)
  4. The data in within the (Default) registry value is what you require
  5. Follow all other steps as per normal

Thanks to jputnam for the details, very elegant solution!!

Update 17.08.2014:

Benjamin has posted the following alternate solution to find the correct registry value for your application:

  1. Launch Command Prompt (Start >> Run >> cmd.exe)
  2. Type assoc.xxxx (where xxxx is the extension of the application you want to disable prompts for)
  3. Example: If you want to disable XML files then you would type assoc.xml
  4. The output you will receive is something like .xml=xmlfile, and this is what you would put as the registry value

Thanks to Benjamin for providing us with another solution.

Re-enable “Do you want to open or save this file?” prompt

If you want to re-enable this prompt because of a users un-ticking the “Always ask before opening this type of file” check-box, then do the following:

  1. Launch Registry Editor (Start >> Run >> regedit.exe)
  2. Expand HKEY_CURRENT_USER
  3. Navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ AttachmentExecute \ {0002DF01-0000-0000-C000-000000000046}
  4. Delete any registry values that exist
  5. Re-launch IE and test – you should now get prompted to open or save for all file types

And that is it guys. We have covered how to disable the “Do you want to open or save this file” prompt as well as re-enabling it for IE8 users if they have un-ticked the “Always ask before opening this type of file” check-box.

If you have any questions or concerns, let me know in the comments below or shoot me an email.

Luca

15 Likes
54 Comments.
  1. Kevin

    This is great. The prompt was driving me crazy. One thing I noticed is (at least in my environment) the binary value needed to be set to InfoPath.Solution.3 (with a dot between solution and the digit.)

    Thanks!

    • Luca Sturlese

      Hi Kevin,

      Actually you are right… there is supposed to be a dot between solution and the digit (so InfoPath.Solution.3 or InfoPath.Solution.4).

      Thanks for picking that up and letting me know, I have fixed that up now.

      Glad it is fixed for you too.

      Luca

  2. KML

    Hi Luca,

    Thanks for article!
    What does this solution exactly do?
    “Disabling” doesn’t say what is outcome for this change… After disabling the file is opened or saved automatically?
    If it’s saving it perfectly fit my needs if it’s for automatically opening how to change it to save file?

    I want to save .xls file

    Regards,
    KML

    • Luca Sturlese

      Hi KML,

      Glad that you liked it. What the solution does it that is prevents the prompt from occurring because it just opens the files (not save).

      If I have understood correctly, you want to be able to automatically save a .xls file (i.e. save without the prompt for opening or saving). Is that correct?

      I have done some research and I can’t seem to find how to auto save a file – that might be a security breach?

      Did you manage to find anything?

      Thanks
      Luca

  3. Marco

    Hi Luca,

    Just want to ask.
    What would be the solution if it is a batch file?

    • Luca Sturlese

      Hi Marco,

      So I just want to confirm, you have a batch file that you would like to essentially auto-run from a webpage in IE? Is that correct?

  4. Marco

    Yes sir, i want to run a batch file from web in IE.

    I’m using SharePoint Server 2007, intranet only.

    • Luca Sturlese

      Hi Marco,

      I am sure this is possible. To find out what the registry key would be follow the “How to disable the prompt for other file types” section in the article post. Unfortunately I don’t have access to a machine with IE8, as I am running Windows 8 so I can’t test that for you.

      If you do find out what the registry key would be, do you mind posting it here just in case others would like to know too?

      Thanks very much
      Luca

  5. Marco

    Yes Luca, i want to auto-run a batch file(not save) from web in IE.

    Our Company use SharePoint Server 2007, and i want to run an exe file automatically using batch file. So that every user can open applications from the server.

  6. Marco

    Is it possible to auto-run an .exe file or .bat file without prompting the “Do you want to run, save or cancel”? on IE?

    i’m aware of the risk, just want to know if there is a way to auto-run these kind of files.

  7. Kenocrates

    Or you could simply disable the prompt from the download manager. See:
    http://support.microsoft.com/kb/2678934

  8. jesse

    hi, if instead of .xsn, im interested in csv files, do you know what should be the name for the binary value? im struggling with it (InfoPath.Solution.4 obviously doesnt work)

    thansk!

    • Luca Sturlese

      Hi Jesse,

      Have a look at the “How to disable the prompt for other file types” section of the article, it will explain how to find the value for other file types – such as your case csv. To do this you will need IE8 installed, so maybe create a VM with IE8 just to test this out if you don’t have a machine with IE8 already. Let me know if you need anymore help. Thanks Luca

  9. Doreen

    We’ve hit this issue with Windows 8.1 and IE11 and have not been able to get around it using the solution as provided below due to MS12-037 published in July 2012 and supporting up thru IE8 – anyone have ideas?

    From Kenocrates –
    Or you could simply disable the prompt from the download manager. See:
    http://support.microsoft.com/kb/2678934

  10. jesse

    thanks luca.
    the name of the reg file created on IE8 for csv files is “Excel.Sheet.8″
    i used that name for my computer with IE11 but im still getting the prompt…
    the only difference between the file on IE8 and IE11 is that one is Type REG_BINARY (IE11) and the other is type REG_NONE (IE8), but that shouldnt make a difference, right?
    thanks.

  11. Hi Luca !!

    I tried to change the registry as told by you and relaunched Internet Explorer. But still I continue to get the message while downloading the file (it is a zip file). What needs to be done ? I am using Windows-8 (64-bit), Internet Explorer 10 and Office 2010.

    • Luca Sturlese

      Hi Mukul,

      What are you trying to download when you get the prompt? Is it an InfoPath form?

      Thanks
      Luca

  12. trudey

    I came across this page in a Google attempt to try to find an answer to why the Open and Save prompts suddenly don’t work on my computer at all. The ‘Save to’ prompt doesn’t work either. Whenever I push one of them to enable a download to begin, the computer thinks for a while and then just quits.
    This of course makes it impossible for me to download anything at all. Help???

    • Luca Sturlese

      Hi Trudey,

      What browser are you using? If it is IE can you please try downloading another browser such as Google Chrome or Mozilla Firefox. Alternatively, try and upgrade to the latest version of IE.

      Hope this helps

      Thanks
      Luca

  13. Vilmondes

    Hi Jesse,

    Did you manage to get it to work on IE11 for .csv files?

    Thanks.

  14. jputnam

    Hey I used this for a project at work. Thank you for the excellent tutorial. One thing I found to make it easier to find the document names is to open regedit and go to HKEY_CLASSES_ROOT then find the extension of the file you want to automatically open. The “Data” listed for the (Default) value should be what you want to use to auto open a file. I haven’t tested them all but it has worked for each of the Office files I’ve needed to open so far.

    Thanks again for the great tutorial!

    • Luca Sturlese

      Thanks Jon for the info!

      That is awesome. I am sure that will help a lot of others as well.

  15. Guys,
    I have IE 10,

    HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ AttachmentExecute \ {0002DF01-0000-0000-C000-000000000046}\InfoPath.Solution.4
    but no value towards the Binary(InfoPath.Solution.3/4) I tried both combinations…

    can any one please help me out on this…

    I have automation suite that needs to open a File JNLP file with direct link but its keep on giving the Prompt…

    Thanks

    Ahmed

    • Luca Sturlese

      Hi Ahmed,

      Have a look at the previous comment from Jon… I think that might help you.

      This is what he said: “One thing I found to make it easier to find the document names is to open regedit and go to HKEY_CLASSES_ROOT then find the extension of the file you want to automatically open. The “Data” listed for the (Default) value should be what you want to use to auto open a file. I haven’t tested them all but it has worked for each of the Office files I’ve needed to open so far.

      Let me know if this helps.

      Thanks
      Luca

  16. Roy B

    Nothing above worked for me. Below worked with .docx, for example.

    1. Install MS12-037
    2. The website must be added to “Local Intranet” zone
    3. The following has to be added to the registry

    [HKEY_CLASSES_ROOT\Word.Document.12]
    “EditFlags”=hex:00,00,01,00

  17. Lauren

    I need to disable this pop-up for .xls and .msg files. Being able to un-click the “Always ask before opening this type of file” would be perfect, but my work computer has IE10 and downloading IE8 isn’t an option. What can I do?

  18. Hi Luca,

    thanks for the tutorial.
    I found the following solution on a Microsoft website which works even better to find the value we need for certain file types (Classes Root didn’t work for me):

    In a DOS Box, type the following text “assoc .pptx”
    (Replace .pptx with the extension of your choice.)
    Output will be: .”pptx=PowerPoint.Show.12″

    Benjamin

    • Luca Sturlese

      Awesome!!! Thanks Benjamin.

      I will add it to the article. Thanks again

      Luca

  19. rene

    Was anyone successful implementing the following settings?
    I am trying to disable the open/ save prompt when I open xml templates displayed as a word document.
    So far I haven’t had any luck.

    How to disable the “do you want to open or save this file?” prompt
    The following solution is for InfoPath Template files. If you want to use another file type you will need to tweak this solution:
    Launch Registry Editor (Start >> Run >> regedit.exe)
    Expand HKEY_CURRENT_USER
    Navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell
    If it doesn’t exist, create the AttachmentExecute key
    Create the {0002DF01-0000-0000-C000-000000000046} key
    Create a new Binary Value with the Name InfoPath.Solution.3
    Re-launch IE and test – should be now working ok
    —————————————————————I
    I created the AttachmentExecute Key first
    under that key I created the {0002DF01-0000-0000-C000-000000000046} key

    It’s not working for me…
    Can anyone help and send me the steps they used?
    Thank you, Rene

    • Luca Sturlese

      Hi Rene,

      The other thing you could try is the comment from Benjamin. I have also added this as an update in the article.

      Give it a go and it should give you the correct value you need to add in the registry.

      Thanks
      Luca

  20. rene

    Trying to bypass /do you want to open or save this file?” prompt
    From my intranet site we have xml templates documents that open with docx.

    my steps:
    Launch Registry Editor (Start >> Run >> regedit.exe)
    Expand HKEY_CURRENT_USER
    Navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell
    If it doesn’t exist, create the AttachmentExecute key
    Create the {0002DF01-0000-0000-C000-000000000046} key
    Create a new Binary Value with the Name Word.Document.12
    Create a new Binary Value with the Name XMLFILe

    It’s not working for me…
    Can anyone please help?
    Thank you, Rene

    • Luca Sturlese

      Hi Rene,

      Please see the “How to disable the prompt for other file types” section of the article, and especially try and follow the 07.06.2014 update steps. These are a series of steps from jputnam which show you how to find the relevant keys you need.

      Hope this helps

      Thanks
      Luca

  21. Rave

    Reduce settings in security tab to medium-low for trusted sites and add those sites which we want to use without prompt.

  22. Kevin

    Thanks for the article. Could you show a screenshot of what the new key looks like in the regedit?

    Just want to make sure I’m doing it write– so far it’s not working…

    • Luca Sturlese

      Hi Kevin,

      Sorry which new key would you like to see?

      Thanks
      Luca

  23. Nitish Patel

    The solution works on IE6 and IE8 but does not work on IE9 and IE10. Any other solution for IE9 and IE10 or later IE versions?

    • Luca Sturlese

      Hi Nitish,

      Have you tried the two solutions found in the updates I have done recently?

      Thanks
      Luca

  24. igor

    hi,
    this solution is incomplete, it contains only 1 out of 2 steps needed to be done to make this work.
    you also need the EditFlags hex 00 00 01 00 as mentioned by Roy B.
    also it does not matter if the registry entry under the persistent handler is dword or hex, if the entry is just there it will work
    also it seems the entries should be under AttachmentExecute/{0002DF01-0000-0000-C000-000000000046}/ in any case, not under the handler id found for this extension in HKR.
    there is also the option to choose if it will open in a browser window or in the associated program by using BrowserFlags next to EditFlags.
    see this link :
    http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/how-do-i-tell-ie9-to-always-open-a-certain/c77ae828-534f-e011-8dfc-68b599b31bf5?page=5
    good luck !
    _i

  25. kaush

    I would like to enable “Do you want to open or save this file” prompt for a .PDM file.
    In HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ there is no AttachmentExecute folder
    In HKEY_CLASSES_ROOT under .pdm folder its set to default.

    yet I am not getting a prompt to open or save file.

    Please advice
    Thanks

    • Luca Sturlese

      Hi Kuash,

      What Internet Explorer version are you not getting the prompt on?

      Also, what version of windows are you running?

      Thanks
      Luca

  26. sri

    would like to disable “Do you want to open or save this file” prompt for a .htm file.
    tried everything listed in this solution chain , still being prompted..

    • Luca Sturlese

      Hi Sri,

      What version of IE are you using and what application are you getting prompted for?

      Thanks
      Luca

  27. Filip

    Hi, i have IE11 and Acrobat Reader XI (11.0.09) on Windows 8.1 x64.
    assoc.pdf gives output .pdf=AcroExch.Document.11 and i have created Binary key with that name, but still when i click on a link it ask me if i want to open,save or cancel.I also tried to create dword values,also tried with AcroPDF.PDF.1 and AcroPDF.PDF (with dword and binary),but it remains the same.If anyone had any success on this on windows 8.1,please share it.

    Thanks,
    Filip

    • Luca Sturlese

      Hi Filip,

      Could you try it in IE8 (you will not be able to use Windows 8.1 for IE8) and then see what registry key gets created. Copy this into your Windows 8.1 machine and see how it goes. The details of this are in the “How to disable the prompt for other file types” section of the article.

      Hope this helps
      Luca

  28. Mahesh

    Tried in IE 9 as below, in windows 7 64-bit.
    HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ AttachmentExecute \ {0002DF01-0000-0000-C000-000000000046}
    In this I have added Binary value FirefoxHTML (for me .pdf Data is FirefoxHTML)
    and also I tried by adding Edit Flags 00,00,01,00

    Can anyone help me out?

    • Luca Sturlese

      Hi Mahesh,

      Have you tried the disabling it in IE8 and seeing what registry value has been created? To do this, have a look at this section How to disable the prompt for other file types. Here is the excerpt from the section:


      If you want to use this solution for another file types other than InfoPath Templates, then I think the easiest way to find the correct registry value you need to create is by simply opening the required file type in Internet Explorer 8 and then un-ticking the “Always ask before opening this type of file” check-box at the bottom of the prompt.

      Once you have done this, launch Registry Editor and navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ Shell \ AttachmentExecute \ {0002DF01-0000-0000-C000-000000000046}. Have a look at what IE has set the registry value name to…. this will be your solution. All you need to do now is deploy to your users via Group Policy or whatever other mechanism and there you have it.

      Hope this helps. Let me know if you need more help

      Thanks
      Luca

  29. Lova

    Hi Luca,
    I try to follow the steps you gave for .tsv in IE10.
    But I have one question : The result of “xml=xmlfile” for my case is “.tsv=tsvfile”.
    Does the name of my binary value “.tsv=tsvfile” or “tsvfile” only?

    Thank you
    Lova

    • Luca Sturlese

      Hi Lova,

      I have actually not tried this solution, this was only part of a previous post by someone called Benjamin. A few people have tried it and mentioned that this has been a successful solution for them, hence why I added it into the original article as an alternative solution.

      Can you please try my original way of determining the registry key, which is by running it up in IE8 and then un-ticking the “Always ask before opening this type of file” check-box at the bottom of the prompt. From here you can then check the registry key generated by the system and use this on your IE10 PC.

      Hope this helps
      Luca

  30. Tom

    Nothing on this page works for .xlsx as of 11/19/2014

  31. Tom

    Using IE10 and Windows 7 all completely up to date. Tried site in trusted..doesn’t work….tried adding Excel.Sheet.12 to registry…doesn’t work….

    • Luca Sturlese

      Hi Tom,

      Can you try using IE10 to disable the prompt and then have a look at what registry key it creates. You can then use that and it should be ok.

      Thanks
      Luca

  32. Scotty

    I wish that you could do this for an entire zone, not a file type. For example, allow all sites in the Intranet and Trusted Sites zone open files without prompting.

  33. Am listing out fewer for who looking for standard file types.

    .doc
    Word.Document.8
    .Xsn
    InfoPath.Solution.3
    .Eml
    Outlook.File.Eml.14
    .Docx
    Word.Document.12
    .xsl
    VisualStudio.xsl.10.0
    .Pdf
    AcroExch.Document
    .vsd
    Visio.Drawing.11
    .Xls
    Excel.Sheet.8
    .Xlsx
    Excel.Sheet.12

  1. […] Source […]

Leave a Comment.