Reading Time: 6 minutes, 22 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!!

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

12 Likes
25 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

Leave a Comment.