Windows 7 – System32\drivers\etc Folder Not Displayed in Notepad++

notepadwindows 7

I am logged in as a user who has Adminstrative privileges on my standalone (not part of a domain) PC, which is running Windows 7 x64 Ultimate, and I've opened Notepad++ "as administrator", yet I cannot see the \etc folder beneath system32\drivers. I want to edit the hosts file there. In file browser, I can see the \etc folder is present, along with many other folders that are not displayed in the Notepad++ open-file dialog. Is this a permissions issue or a Notepad++ issue?

Best Answer

The issue is folder redirection, If a 32 bit program attempts to access the System32 folder it will be invisibly redirected to the %windir%\SysWOW64 directory, this is for 32/64 bit application compatibility.

All the files in System32 are 64 bit, however if a program was incorrectly written they may have hard-coded the System32 in to their program when looking for a DLL. To prevent random program crashes from incorrectly written programs Microsoft does that redirect.

Now if you look at that link I posted at the top %windir%\system32\drivers\etc is exempt from this redirection, that is why if you go directly there it works fine, but if you are in %windir%\system32\drivers you are really looking at the %windir%\SysWoW64\drivers folder which does not contain a etc subfolder.

There are a few workarounds

  1. you need to either directly enter %windir%\system32\drivers\etc
  2. navigate to the "hidden" folder %windir%\sysnative which will take you to the "real" System32 folder and you can go up the directory tree like normal.
  3. When you are in %windir%\System32\drivers manually click the address bar and add on the \etc to the folder path (this is really just another way of doing method #1)
Related Question