I have a shortcut to
, but it won't let me save when I've edited. I've tried "Take Ownership"
on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
On 12/07/2025 05:03, J. P. Gilliver wrote:
I have a shortcut to
, but it won't let me save when I've edited. I've tried "Take Ownership"
on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
To edit and save the hosts file you need to launch Notepad as
Administrator. Then you need to visit the hosts file in Notepad by going to:
File >> Open <"C:\Windows\System32\drivers\etc\hosts">
Make sure "All Files" is selected in notepad.
To launch Notepad as Administrator you need to Right-Click on the
Notepad icon and choose rum as Administrator. The list is quite long so
pay particular attention to Run as Administrator.
The alternative method to edit and save the hosts file is to drag it to
the desktop, edit it and save it before dragging again to the correct
folder.
On 2025/7/12 6:8:4, Operation Sindoor wrote:
On 12/07/2025 05:03, J. P. Gilliver wrote:
I have a shortcut to
, but it won't let me save when I've edited. I've tried "Take Ownership" >>> on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
(I don't know what happened above - maybe I forgot to paste in the
command line that's in my shortcut!)>
To edit and save the hosts file you need to launch Notepad asThanks - noted.>
Administrator. Then you need to visit the hosts file in Notepad by
going to:
File >> Open <"C:\Windows\System32\drivers\etc\hosts">
Make sure "All Files" is selected in notepad.
To launch Notepad as Administrator you need to Right-Click on the
Notepad icon and choose rum as Administrator. The list is quite long so
pay particular attention to Run as Administrator.
The alternative method to edit and save the hosts file is to drag it to
the desktop, edit it and save it before dragging again to the correct
folder.
The command line in my shortcut is
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts."
I thought, maybe I can do what you suggest by making my _shortcut_ open
as administrator. So I ticked that box. Now, when I activate the
shortcut, it comes up with the do-you-want-to-allow...-to-make-changes
prompt (which Notepad in normal mode doesn't usually), which sounded promising; I say yes, and notepad opens - but then pops up a box saying
it can't find hosts.txt, do I want to create it?
I've experimented with the above line - without quotes, with quotes but
no final ., and as above - all seem to open Notepad (with the do-you-want-to-allow, which is good), but thinking it's going to edit hosts.txt, rather than just hosts.
I suppose I could make a shortcut - with admin. open - to a two-line
batch file to edit notes.txt (or any other name, for that matter), and
then rename it to hosts (and also copy it to hosts.txt for next time;
or, copy hosts.txt to hosts), but I thought I'd ask here first if
there's any way to make the simple shortcut work.
Thought: does Notepad have some switch ... typing
notepad /?
into a command prompt. Notepad opened, with a popup "The filename,
directory name, or volume label syntax is incorrect." So I tried
help notepad
, and got
This command is not supported by the help utility. Try "notepad /?".
! Tried
notepad < "C:\Windows\System32\drivers\etc\hosts."
(both without and with the quote marks), and got "The system cannot find
the file specified." (I wondered if it just meant it couldn't find
notepad, but typing that by itself opens it.)
That batch file is sounding more and more likely, but I'll wait to see
if anyone here knows a way of, in a shortcut target line (or at the
command prompt), calling notepad with a parameter that has no extension!
(It works _with_ one, which doesn't have to be .txt; for example, I just tried
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts.org"
[all one line, of course] and it opened notepad on that file.) I've
added the W11 and W7 'groups as this particular wrinkle - how to invoke notepad with an extensionless parameter - might generate knowledge
there, though the initial problem wasn't there in 7 (I can't remember
the details, but I had a shortcut to the hosts file that worked there).>
I have a shortcut to
%windir%\system32\notepad.exe C:\Windows\System32\drivers\etc\hosts
, but it won't let me save when I've edited. I've tried "Take Ownership"
on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
On 2025/7/12 6:8:4, Operation Sindoor wrote:
On 12/07/2025 05:03, J. P. Gilliver wrote:
I have a shortcut to
, but it won't let me save when I've edited. I've tried "Take Ownership" >>> on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
(I don't know what happened above - maybe I forgot to paste in the
command line that's in my shortcut!)>
To edit and save the hosts file you need to launch Notepad asThanks - noted.>
Administrator. Then you need to visit the hosts file in Notepad by
going to:
File >> Open <"C:\Windows\System32\drivers\etc\hosts">
Make sure "All Files" is selected in notepad.
To launch Notepad as Administrator you need to Right-Click on the
Notepad icon and choose rum as Administrator. The list is quite long so
pay particular attention to Run as Administrator.
The alternative method to edit and save the hosts file is to drag it to
the desktop, edit it and save it before dragging again to the correct
folder.
The command line in my shortcut is
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts."
I thought, maybe I can do what you suggest by making my _shortcut_ open
as administrator. So I ticked that box. Now, when I activate the
shortcut, it comes up with the do-you-want-to-allow...-to-make-changes
prompt (which Notepad in normal mode doesn't usually), which sounded promising; I say yes, and notepad opens - but then pops up a box saying
it can't find hosts.txt, do I want to create it?
I've experimented with the above line - without quotes, with quotes but
no final ., and as above - all seem to open Notepad (with the do-you-want-to-allow, which is good), but thinking it's going to edit hosts.txt, rather than just hosts.
I suppose I could make a shortcut - with admin. open - to a two-line
batch file to edit notes.txt (or any other name, for that matter), and
then rename it to hosts (and also copy it to hosts.txt for next time;
or, copy hosts.txt to hosts), but I thought I'd ask here first if
there's any way to make the simple shortcut work.
Thought: does Notepad have some switch ... typing
notepad /?
into a command prompt. Notepad opened, with a popup "The filename,
directory name, or volume label syntax is incorrect." So I tried
help notepad
, and got
This command is not supported by the help utility. Try "notepad /?".
! Tried
notepad < "C:\Windows\System32\drivers\etc\hosts."
(both without and with the quote marks), and got "The system cannot find
the file specified." (I wondered if it just meant it couldn't find
notepad, but typing that by itself opens it.)
That batch file is sounding more and more likely, but I'll wait to see
if anyone here knows a way of, in a shortcut target line (or at the
command prompt), calling notepad with a parameter that has no extension!
(It works _with_ one, which doesn't have to be .txt; for example, I just tried
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts.org"
[all one line, of course] and it opened notepad on that file.) I've
added the W11 and W7 'groups as this particular wrinkle - how to invoke notepad with an extensionless parameter - might generate knowledge
there, though the initial problem wasn't there in 7 (I can't remember
the details, but I had a shortcut to the hosts file that worked there).>
On 2025/7/12 6:8:4, Operation Sindoor wrote:
On 12/07/2025 05:03, J. P. Gilliver wrote:
I have a shortcut to
, but it won't let me save when I've edited. I've tried "Take Ownership" >> on C:\Windows\System32\drivers\etc, which seemed to run, but I still
can't save changes.
(I don't know what happened above - maybe I forgot to paste in the
command line that's in my shortcut!)>
To edit and save the hosts file you need to launch Notepad as Administrator. Then you need to visit the hosts file in Notepad by going to:
File >> Open <"C:\Windows\System32\drivers\etc\hosts">
Make sure "All Files" is selected in notepad.
To launch Notepad as Administrator you need to Right-Click on the
Notepad icon and choose rum as Administrator. The list is quite long so
pay particular attention to Run as Administrator.
The alternative method to edit and save the hosts file is to drag it to
the desktop, edit it and save it before dragging again to the correct folder.
Thanks - noted.>
The command line in my shortcut is
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts."
I thought, maybe I can do what you suggest by making my _shortcut_ open
as administrator. So I ticked that box. Now, when I activate the
shortcut, it comes up with the do-you-want-to-allow...-to-make-changes
prompt (which Notepad in normal mode doesn't usually), which sounded promising; I say yes, and notepad opens - but then pops up a box saying
it can't find hosts.txt, do I want to create it?
I've experimented with the above line - without quotes, with quotes but
no final ., and as above - all seem to open Notepad (with the do-you-want-to-allow, which is good), but thinking it's going to edit hosts.txt, rather than just hosts.
I suppose I could make a shortcut - with admin. open - to a two-line
batch file to edit notes.txt (or any other name, for that matter), and
then rename it to hosts (and also copy it to hosts.txt for next time;
or, copy hosts.txt to hosts), but I thought I'd ask here first if
there's any way to make the simple shortcut work.
Thought: does Notepad have some switch ... typing
notepad /?
into a command prompt. Notepad opened, with a popup "The filename,
directory name, or volume label syntax is incorrect." So I tried
help notepad
, and got
This command is not supported by the help utility. Try "notepad /?".
! Tried
notepad < "C:\Windows\System32\drivers\etc\hosts."
(both without and with the quote marks), and got "The system cannot find
the file specified." (I wondered if it just meant it couldn't find
notepad, but typing that by itself opens it.)
That batch file is sounding more and more likely, but I'll wait to see
if anyone here knows a way of, in a shortcut target line (or at the
command prompt), calling notepad with a parameter that has no extension!
(It works _with_ one, which doesn't have to be .txt; for example, I just tried
%windir%\system32\notepad.exe "C:\Windows\System32\drivers\etc\hosts.org"
[all one line, of course] and it opened notepad on that file.) I've
added the W11 and W7 'groups as this particular wrinkle - how to invoke notepad with an extensionless parameter - might generate knowledge
there, though the initial problem wasn't there in 7 (I can't remember
the details, but I had a shortcut to the hosts file that worked there).>
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 508 |
Nodes: | 16 (1 / 15) |
Uptime: | 238:40:02 |
Calls: | 9,985 |
Calls today: | 3 |
Files: | 13,836 |
Messages: | 6,358,296 |