Why is the system32\drivers\etc folder not displayed in Notepad++ when opened as Administrator in Windows 7

21

2

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?

mrblint

Posted 2013-07-09T13:23:50.930

Reputation: 421

FreeCommander XE 2018 Build 770 32-bit public seems to have the same issue. – raphael75 – 2018-09-06T17:17:10.983

Did you try right clicking on the hosts file and select "Open with Notepad++". This works if your goal is to edit the file. – Bryan – 2013-07-09T13:35:03.373

3You can put the full path by hand in the path field in the file dialog. This is the best way to view hidden system folders. – Ramhound – 2013-07-09T13:40:14.503

@Bryan: it can be done as you suggested; but I was wondering if there was a way to reveal these hidden folders to Notepad++, since then it could be done in one step rather than two -- I wouldn't have to browse to the location first with File Browser (I don't always remember the path exactly). – mrblint – 2013-07-09T15:37:26.483

You can expose hidden files on your machine via the "Folder Options" control panel -> View -> "Show Hidden Files, Folders or Drives". OR....you could un-hide the file. From the command line "Attrib -h c:\windows\system32\drivers\etc\hosts" might want to do the "etc" folder too while you are at it.. Though I don't remember that folder being hidden by default. – MikeAWood – 2013-07-10T01:38:38.247

Answers

31

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)

Scott Chamberlain

Posted 2013-07-09T13:23:50.930

Reputation: 28 923

0

I had exactly the same problem and found the explanations here helpful but the answer is even simpler than they suggest - you don't have to type the whole path name in or do any any folder redirection. When you run Notepad++ as Administrator and use File, Open you can navigate to the drivers folder and just add into the Filename dialog box: /etc/hosts (or any other file you want to open) - it opens immediately.

wendyconnect

Posted 2013-07-09T13:23:50.930

Reputation: 1

0

I guess it's x32 issue. x32 Notepad++ maybe can't see "etc" folder right on x64 OS. No x64 version exists yet. Try NPP forum for some workaround.

RProgram

Posted 2013-07-09T13:23:50.930

Reputation: 475

32-bit programs can see 64-bit system32 folder via sysnative. And there's 64-bit Notepad++ at this point of time although less developed than the 32-bit version – phuclv – 2017-07-05T07:06:59.497

0

I have unlocked administrator account here is how to do it: http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-windows-vista/

And now i can see it

malakrsnaslava

Posted 2013-07-09T13:23:50.930

Reputation: 2 533

dont know is it notpead++ or windows problem :( – malakrsnaslava – 2013-07-13T22:09:37.767

1It is not an administrative problem, it is a 32/64 bit problem. See my answer. – Scott Chamberlain – 2013-07-13T23:04:36.000