Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. XP Dowloading file defaults to Text

XP Dowloading file defaults to Text

Scheduled Pinned Locked Moved System Admin
12 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Not sure if this is the correct forum but didn't know where else to put it. I have a few (actually a lot) of clients still on XP SP3 using various versions of Internet Explorer. They download files from a particular Web site where the files have non-standard file extensions like .2345 or .522AB. On a couple of systems the Save Type As defaults to Text and then appends a .TXT extension to the file. I need the files to have the original extensions. I've tried adding the extensions to Registered File Types and I've looked everywhere for a default download file type, but can't find anything. Also searched the Web (honest) but am stumped and it's driving me crazy.

    It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca

    P L 2 Replies Last reply
    0
    • L Lost User

      Not sure if this is the correct forum but didn't know where else to put it. I have a few (actually a lot) of clients still on XP SP3 using various versions of Internet Explorer. They download files from a particular Web site where the files have non-standard file extensions like .2345 or .522AB. On a couple of systems the Save Type As defaults to Text and then appends a .TXT extension to the file. I need the files to have the original extensions. I've tried adding the extensions to Registered File Types and I've looked everywhere for a default download file type, but can't find anything. Also searched the Web (honest) but am stumped and it's driving me crazy.

      It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca

      P Offline
      P Offline
      Peter_in_2780
      wrote on last edited by
      #2

      [Probably lives in web dev forum, but I'll answer here.] If you have control/influence over the server, check and adjust the Content-type and Content-Disposition HTML meta headers. If the browser they use has a single brain cell left, you should be able to tell it (a) that the file is plain text and (b) [edit] where (i.e. the filename) [/edit] to save it by default. hth Peter [edit] clarified use of disposition as marked. [/edit]

      Software rusts. Simon Stephenson, ca 1994.

      L 1 Reply Last reply
      0
      • P Peter_in_2780

        [Probably lives in web dev forum, but I'll answer here.] If you have control/influence over the server, check and adjust the Content-type and Content-Disposition HTML meta headers. If the browser they use has a single brain cell left, you should be able to tell it (a) that the file is plain text and (b) [edit] where (i.e. the filename) [/edit] to save it by default. hth Peter [edit] clarified use of disposition as marked. [/edit]

        Software rusts. Simon Stephenson, ca 1994.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Thanks for the reponse but this isn't a programming question. What I can't figure out is how IE should be configured so that there is no default file type when downloading files for extensions it doesn't recognize.

        It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

        L 1 Reply Last reply
        0
        • L Lost User

          Thanks for the reponse but this isn't a programming question. What I can't figure out is how IE should be configured so that there is no default file type when downloading files for extensions it doesn't recognize.

          It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Read this, it might help you ... http://msdn.microsoft.com/en-us/library/ms775147%28v=vs.85%29.aspx[^]

          1 Reply Last reply
          0
          • L Lost User

            Not sure if this is the correct forum but didn't know where else to put it. I have a few (actually a lot) of clients still on XP SP3 using various versions of Internet Explorer. They download files from a particular Web site where the files have non-standard file extensions like .2345 or .522AB. On a couple of systems the Save Type As defaults to Text and then appends a .TXT extension to the file. I need the files to have the original extensions. I've tried adding the extensions to Registered File Types and I've looked everywhere for a default download file type, but can't find anything. Also searched the Web (honest) but am stumped and it's driving me crazy.

            It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            AnnieMacD, It sounds to me as if the Systems Administrator may have enabled MIME Sniffing Safety which essentially causes Internet Explorer to inspect the first N-Bytes of the file and attempt to automatically determine the MIME type and disregard the file extension. This is generally desirable on a high-security network... where EvilHackerX wants you to download EvilPayload.txt but it is actually an executable... the MIME Sniffing Safety feature would read the first few bytes and see that it is actually an executable and correctly rename it to EvilPayload.txt**.exe** Check those workstations by going into the group policy editor (gpedit.exe) and navigate to: \\Administrative Templates\Windows Components\Internet Explorer\Security Features\MIME Sniffing Safety Feature Check to see if disabling this feature fixes the issue you are describing. Best Wishes, -David Delaune

            L 1 Reply Last reply
            0
            • L Lost User

              AnnieMacD, It sounds to me as if the Systems Administrator may have enabled MIME Sniffing Safety which essentially causes Internet Explorer to inspect the first N-Bytes of the file and attempt to automatically determine the MIME type and disregard the file extension. This is generally desirable on a high-security network... where EvilHackerX wants you to download EvilPayload.txt but it is actually an executable... the MIME Sniffing Safety feature would read the first few bytes and see that it is actually an executable and correctly rename it to EvilPayload.txt**.exe** Check those workstations by going into the group policy editor (gpedit.exe) and navigate to: \\Administrative Templates\Windows Components\Internet Explorer\Security Features\MIME Sniffing Safety Feature Check to see if disabling this feature fixes the issue you are describing. Best Wishes, -David Delaune

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Thanks, I think this is what I was looking for. I'll try it out at the beginning of the week - hopefully that will do it.

              It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

              L 1 Reply Last reply
              0
              • L Lost User

                Thanks, I think this is what I was looking for. I'll try it out at the beginning of the week - hopefully that will do it.

                It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                AnnieMacD wrote:

                Thanks, I think this is what I was looking for.

                Well let me know how it turns out. Keep in mind that even if the domain/workgroup policy is 'Not Configured' that the user may have enabled this feature in the browser itself. You can view this by opening Internet Explorer 'Internet Options' and navigating to the 'Security' tab and pressing the 'Custom Level' button... scroll through the settings until you find 'Enable MIME Sniffing'. It it possible that the users have enabled it here. You could force the policy of 'Disabled' upon your subordinates through the group policy editor. Btw... I am serious about letting me know if this was the cause of the problem. I am somewhat making an educated guess at what causes the issue you describe. Best Wishes, -David Delaune

                L 1 Reply Last reply
                0
                • L Lost User

                  AnnieMacD wrote:

                  Thanks, I think this is what I was looking for.

                  Well let me know how it turns out. Keep in mind that even if the domain/workgroup policy is 'Not Configured' that the user may have enabled this feature in the browser itself. You can view this by opening Internet Explorer 'Internet Options' and navigating to the 'Security' tab and pressing the 'Custom Level' button... scroll through the settings until you find 'Enable MIME Sniffing'. It it possible that the users have enabled it here. You could force the policy of 'Disabled' upon your subordinates through the group policy editor. Btw... I am serious about letting me know if this was the cause of the problem. I am somewhat making an educated guess at what causes the issue you describe. Best Wishes, -David Delaune

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  David, I really appreciate your help/advice. I can't check my clients' machine until Monday but I still have one computer here with XP SP3 and IE7. It would appear that the option in IE7 is "Open files based on content, not file extension". I have mine set to 'enabled' and I don't have the problem. But I will set theirs to 'disable'. BTW I assume you are working on Windows 7. Under XP (at least on my local machine), the Group Policy Editor does not have an Internet Explorer option under \\Administrative Templates\Windows Components. Even if this doesn't work you have helped me a lot in that I wasn't aware of the MIME Sniffing Safety feature. Funny thing is my app does a similar thing with these crazy-named files that the users download - it opens them up and then acts on them depending on the first few characters. Trouble is, I have no interest in .TXT files! I will most definitely let you know how it gets resolved.

                  It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    David, I really appreciate your help/advice. I can't check my clients' machine until Monday but I still have one computer here with XP SP3 and IE7. It would appear that the option in IE7 is "Open files based on content, not file extension". I have mine set to 'enabled' and I don't have the problem. But I will set theirs to 'disable'. BTW I assume you are working on Windows 7. Under XP (at least on my local machine), the Group Policy Editor does not have an Internet Explorer option under \\Administrative Templates\Windows Components. Even if this doesn't work you have helped me a lot in that I wasn't aware of the MIME Sniffing Safety feature. Funny thing is my app does a similar thing with these crazy-named files that the users download - it opens them up and then acts on them depending on the first few characters. Trouble is, I have no interest in .TXT files! I will most definitely let you know how it gets resolved.

                    It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    AnnieMacD wrote:

                    It would appear that the option in IE7 is "Open files based on content, not file extension".

                    I just checked and you are correct... on Windows XP this IE8 security feature is called 'Open Files based on content, not file extension'.

                    AnnieMacD wrote:

                    BTW I assume you are working on Windows 7.

                    Yep, your psychic abilities are working very well. :)

                    AnnieMacD wrote:

                    Under XP (at least on my local machine), the Group Policy Editor does not have an Internet Explorer option under \\Administrative Templates\Windows Components.

                    Interesting... all 13 XP-Sp3 workstations here in my lab have \\Administrative Templates\Windows Components\Internet Explorer in the group policy editor. I guess the IE8 and IE9 installers adds this. I would suggest that you install: Administrative Templates for Internet Explorer 7 for Windows[^] I highly recommend that you upgrade all workstations under your control to IE8 or IE9. Best Wishes, -David Delaune

                    L 2 Replies Last reply
                    0
                    • L Lost User

                      AnnieMacD wrote:

                      It would appear that the option in IE7 is "Open files based on content, not file extension".

                      I just checked and you are correct... on Windows XP this IE8 security feature is called 'Open Files based on content, not file extension'.

                      AnnieMacD wrote:

                      BTW I assume you are working on Windows 7.

                      Yep, your psychic abilities are working very well. :)

                      AnnieMacD wrote:

                      Under XP (at least on my local machine), the Group Policy Editor does not have an Internet Explorer option under \\Administrative Templates\Windows Components.

                      Interesting... all 13 XP-Sp3 workstations here in my lab have \\Administrative Templates\Windows Components\Internet Explorer in the group policy editor. I guess the IE8 and IE9 installers adds this. I would suggest that you install: Administrative Templates for Internet Explorer 7 for Windows[^] I highly recommend that you upgrade all workstations under your control to IE8 or IE9. Best Wishes, -David Delaune

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      Thanks again, David, for your help. The Administrative Templates are for XP SP2 but I downloaded them anyway but made no difference - still not there. I'm afraid I'm in the unfortunate situation of not having much influence on what my clients have on their machines. It took me a long time to convince the non-Win7 ones to upgrade to SP3 of XP - I'm developing in .NET 4 and the Client will not install on SP2. I only keep XP and IE7 for support purposes but can't have every combination! Monday I'll change the "Open files based on content, not file extension" option and that may fix it, and I'll let you know if it works.

                      It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                      1 Reply Last reply
                      0
                      • L Lost User

                        AnnieMacD wrote:

                        It would appear that the option in IE7 is "Open files based on content, not file extension".

                        I just checked and you are correct... on Windows XP this IE8 security feature is called 'Open Files based on content, not file extension'.

                        AnnieMacD wrote:

                        BTW I assume you are working on Windows 7.

                        Yep, your psychic abilities are working very well. :)

                        AnnieMacD wrote:

                        Under XP (at least on my local machine), the Group Policy Editor does not have an Internet Explorer option under \\Administrative Templates\Windows Components.

                        Interesting... all 13 XP-Sp3 workstations here in my lab have \\Administrative Templates\Windows Components\Internet Explorer in the group policy editor. I guess the IE8 and IE9 installers adds this. I would suggest that you install: Administrative Templates for Internet Explorer 7 for Windows[^] I highly recommend that you upgrade all workstations under your control to IE8 or IE9. Best Wishes, -David Delaune

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        Dave, just a quick update.

                        Randor wrote:

                        'Open Files based on content, not file extension'.

                        This didn't appear to do anything, so, as a workaround, I added the extensions I knew about to the Registered File Types list. When they were downloading files, the default file type still came up as 'Text File' but it did not add the .TXT extension. This is not a totally satisfactory solution for a number of reasons not least of which I don't yet know all the extensions, so I'm getting calls to a) add the extension to the list and, b) remove the .TXT. However, I can do it programatically in my next update but that too is essentially burying my head in the sand! What I don't understand is what determines whether there will be a problem or not. Only a handful of XP clients have the issue and I can't yet see anything that makes them different from the majority. BTW I have no influence whatsoever as to what browser they are using :thumbsdown:

                        It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                        L 1 Reply Last reply
                        0
                        • L Lost User

                          Dave, just a quick update.

                          Randor wrote:

                          'Open Files based on content, not file extension'.

                          This didn't appear to do anything, so, as a workaround, I added the extensions I knew about to the Registered File Types list. When they were downloading files, the default file type still came up as 'Text File' but it did not add the .TXT extension. This is not a totally satisfactory solution for a number of reasons not least of which I don't yet know all the extensions, so I'm getting calls to a) add the extension to the list and, b) remove the .TXT. However, I can do it programatically in my next update but that too is essentially burying my head in the sand! What I don't understand is what determines whether there will be a problem or not. Only a handful of XP clients have the issue and I can't yet see anything that makes them different from the majority. BTW I have no influence whatsoever as to what browser they are using :thumbsdown:

                          It is an absolute certainty that there are no certainties. ~ Christopher Hitchens 1949-2011

                          L Offline
                          L Offline
                          Lost User
                          wrote on last edited by
                          #12

                          Hey Annie, Well I completely read the link Richard Abbott gave: MIME Type Detection in Internet Explorer[^] along with another one here: Handling MIME Types in Internet Explorer[^] and it is quite obvious that they are using a probabilistic algorithm to 'guess' the MIME type. Could you double check that FEATURE_MIME_HANDLING is actually disabled in the registry? HKEY_LOCAL_MACHINE(or Current User)\Software \Microsoft \Internet Explorer\Main \FeatureControl\FEATURE_MIME_SNIFFING\ Some documentation on the MIME handling subject: Event 1021 - MIME Handling Restrictions[^] Internet Explorer MIME Handling Enforcement[^] Best Wishes, -David Delaune

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups