Windows7 will not allow me to open XML file in system32 directory

5,967

It's not protecting it, I'll bet your are attempting to open the file user a 32 bit editor and running into Windows file redirection. On 64 bit Windows the 64 bit system directory is c:\windows\system32 while the 32 bit system directory is c:\windows\syswow64. When a 32 bit application requests c:\windows\system32 Windows redirects the request to c:\windows\sysyswow64.

So if you ask a 32 bit application to open c:\windows\system32\task.xml it will get redirected to c:\windows\syswow64\task.xml and fail to find the file, since it doesn't exist. The reason it works when you rename it to .txt is that it ends up opening in a 64 bit copy of notepad, which sees the file correctly.

Try opening the file in both Internet Explorer and Internet Explorer (64-bit). It will in the 64 bit version but not the 32 bit.

Share:
5,967

Related videos on Youtube

Adam
Author by

Adam

Updated on September 17, 2022

Comments

  • Adam
    Adam over 1 year

    Here is a strange issue: On my Windows7 64 bit PC, I create a Scheduled Task. Then I export the Task details as an XML file -- saving it in the suggested / default location: C:\Windows\System32. Then, using Windows Explorer, I navigate to that directory and try to edit the file (right-click / edit). This causes an error message to be displayed: Windows cannot find "my Task name.xml ...". Same result if I try to Open the file (right click / open) -- except that Windows repeats the error message three times.

    If I copy the file to another directory, then I can edit it and/or open it as one would expect. I can then copy it back into System32. But then once it is back in System32, once again I cannot edit or open it. There are other files in system32 that I can open/edit, with no problem. And if I chane the XML extension to, say, .txt -- THEN I can edit the file "in place" there in System32. So what's going on here? Why is W7 overly protective of XML files in that specific directory? (I did this with several different tasks -- all with the same results)

    And before you ask ... the reason I exported the file in the first place ... is because for some unfathomable reason, MS seems to have removed the ability to Rename a task in W7. The only way I can figure, to rename a task, is to export it / rename the file / import it / delete the original task. What a joke.

  • Adam
    Adam almost 14 years
    Your explanation makes sense. And when I use "open with notepad" on the system32 file it opens just fine, which seems to confirm what you explained. So thanks! Are there any other "special" directories like this, of which I should be aware? (where the OS will do some slight-of-hand depending on whether the program running is 32 or 64 bit)
  • JJ_Australia
    JJ_Australia almost 14 years
    C:\Program Files?
  • JJ_Australia
    JJ_Australia almost 14 years
    Apparently not.
  • shf301
    shf301 almost 14 years
    I believe it is just the System directory: msdn.microsoft.com/en-us/library/aa384187%28v=VS.85%29.aspx