Community
    • Login

    %systemroot%/system32/drivers/etc/ not found

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 3.9k Views 2 Watching
    Loading More Posts
    • 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.
    • duxingzheD Offline
      duxingzhe
      last edited by duxingzhe

      I try to modify the hosts file on Windows. However, if I use Notepad++, it will not show the hosts in etc directory.Either adminstration mode. It happens in about serveral versions and I am stranged that it still exists in the newest version. It brings a lot of inconvence to me. I change to sublime. Please fix this problem.

      1 Reply Last reply Reply Quote 0
      • PeterJonesP Offline
        PeterJones
        last edited by PeterJones

        I’m on Notepad++ 7.3.3 32-bit. And I am betting your “several versions” were all 32bit Notepad++ as well.

        When I do File > Open, then type %systemroot%\system32\drivers\etc into the top location bar, or into the “File Name” bar at the bottom, it correctly changes into that directory. If, instead, I type %systemroot%\system32\drivers into one of those boxes, I just see the en-US\ and UMDF\ subdirectories, and a couple of files.

        I figured out the “problem” using a normal Explorer window: When I browse to %systemroot%\system32\drivers, it shows all the subdirs, including the etc\ subdir. But if I browse to %systemroot%\SysWOW64\drivers, it doesn’t have the etc\ subdir.

        The “problem” is that 64-bit Windows lies to 32-bit applications, by way of the “File System Redirector” (see MSDN 🔗). If a 32-bit application requests %systemroot%\system32\, Windows actually silently redirects them to %systemroot%\SysWOW64\ (where “SysWOW64” is short for “SYStem32 for 32-bit Windows On Windows64”). There’s a “special” alias %systemroot%\SysNative\, which will allow a 32-bit application to access the native 64-bit system32 directory… but it’s “specialness” comes in the fact that a directory listing won’t show it: if you look in %systemroot%, you will not see a sysnative subdirectory; but if you manually type in the %systemroot%\sysnative, it will go where you mean.

        I’m actually now surprised that typing %systemroot%\system32\drivers\etc did what I meant. I’m surprised I didn’t have to type %systemroot%\sysnative\drivers\etc. But I won’t complain. ☺

        update: Footnote: the %systemroot%\sysnative alias is “special” in another way: from a 64-bit application, it won’t exist at all. So from the normal Explorer file browser in windows, even typing it will give you a not-found error.

        1 Reply Last reply Reply Quote 0
        • duxingzheD Offline
          duxingzhe
          last edited by

          I did’t type it. I just use file explorer to navigate to C:\Windows\system32\drivers\etc\ directory by directory. Sublime is 64bit. It may the reason that you mentioned.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors