%systemroot%/system32/drivers/etc/ not found
-
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.
-
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\etcinto 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\driversinto one of those boxes, I just see theen-US\andUMDF\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 theetc\subdir. But if I browse to%systemroot%\SysWOW64\drivers, it doesn’t have theetc\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-bitsystem32directory… 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 asysnativesubdirectory; 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\etcdid 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%\sysnativealias 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. -
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.
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