• Re: How do I get at the hosts file?

    From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sat Jul 12 14:37:20 2025
    From Newsgroup: alt.windows7.general

    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).>





    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    "Victory does not bring with it a sense of triumph - rather the dull
    numbness of relief..."
    - Cecil Beaton quoted by Anthony Horowitz, RT 2015/1/3-9
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Operation Sindoor@Operation.Sindoor@invalid.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sat Jul 12 19:39:53 2025
    From Newsgroup: alt.windows7.general

    On 12/07/2025 14:37, J. P. Gilliver wrote:
    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

    -a %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

    -a-a-a-anotepad /?

    into a command prompt. Notepad opened, with a popup "The filename,
    directory name, or volume label syntax is incorrect." So I tried

    -a-a-a-ahelp notepad

    , and got

    -a-a This command is not supported by the help utility.-a Try "notepad /?".

    ! Tried

    -a-a-a-anotepad < "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

    -a-a-a-a%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).>









    You need to do the simplest thing in Windows. From above I surmise that
    you are doing the long winded method and it only complicates the matter.

    In the search box type Notepad.exe. When you get the search result,
    right click on it and choose run as administrator.

    Then do what is shown in this picture:

    <https://i.imgur.com/92EA7P9.png>

    In the picture I have high-lighted All Files and file name I just copied
    and pasted the link previously given.

    hosts file hasn't got an extension and by default Notepad only sees .txt
    file so you need to change this for this exercise.

    All Windows System have hosts file (by default) unless the user or some malware has deleted it. It is easy to create one as it is a plain text
    file. Make sure it is saved as "hosts" -- no .txt nor no ".". By dot I
    mean don't save save as "hosts." <== Notice the dot in the file name.
    Don't do it.

    Hope this helps.

    Jai Hind



    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sat Jul 12 22:01:13 2025
    From Newsgroup: alt.windows7.general

    On Sat, 12 Jul 2025 14:37:20 +0100
    "J. P. Gilliver" <G6JPG@255soft.uk> wrote:

    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).>




    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    works for me on XP
    - as does
    %windir%\system32\write.exe c:\windows\system32\drivers\etc\hosts
    and
    %windir%\system32\write.exe %windir%\system32\drivers\etc\hosts



    - I recommend you drop your trailing '.'

    (notepad under XP won't open my large hosts file)
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From MikeS@mikes@is.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sat Jul 12 22:07:28 2025
    From Newsgroup: alt.windows7.general

    On 12/07/2025 14:37, J. P. Gilliver wrote:
    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

    -a %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

    -a-a-a-anotepad /?

    into a command prompt. Notepad opened, with a popup "The filename,
    directory name, or volume label syntax is incorrect." So I tried

    -a-a-a-ahelp notepad

    , and got

    -a-a This command is not supported by the help utility.-a Try "notepad /?".

    ! Tried

    -a-a-a-anotepad < "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

    -a-a-a-a%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).>







    This shortcut works for me after setting it to open as administrator by ticking the box:
    %windir%\system32\notepad.exe /A "C:\Windows\System32\drivers\etc\hosts"
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 13:22:52 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/12 20:39:53, Operation Sindoor wrote:
    []

    You need to do the simplest thing in Windows. From above I surmise that
    you are doing the long winded method and it only complicates the matter.

    In the search box type Notepad.exe. When you get the search result,
    right click on it and choose run as administrator.

    Then do what is shown in this picture:

    <https://i.imgur.com/92EA7P9.png>

    In the picture I have high-lighted All Files and file name I just copied
    and pasted the link previously given.

    So your "simplest thing" is:
    1. search for Notepad
    2. open it as administrator
    3. work my way to where hosts is (several steps really)
    4. edit it
    5. save it, changing to "all files" (more than one step really)

    - OK, nothing complicated, but not IMO "simple"!

    I'm after single-click - and, with MikeS's help, have achieved it! (See
    later post.)>
    hosts file hasn't got an extension and by default Notepad only sees .txt
    file so you need to change this for this exercise.

    All Windows System have hosts file (by default) unless the user or some malware has deleted it. It is easy to create one as it is a plain text
    file. Make sure it is saved as "hosts" -- no .txt nor no ".". By dot I
    mean don't save save as "hosts." <== Notice the dot in the file name.
    Don't do it.

    (Yes, I knew that, thanks.)
    []
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 13:36:32 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Though I remember that, from I think about Windows 95 or 98 on, it was
    there, but really just a redirect to Wordpad. And it _seems_ to be that
    here; hard to tell, as I can't do Help | About, since they've removed
    Help from the menu of lots of things (maybe all integrated ones?) in 10.

    The above line works though. But, as it's trying to be a word processor,
    it has broken the lines over a certain length. I thought maybe that
    won't matter if I "save as" a plain text file, so I tried (I have a
    backup). It _has_ no "all files" option (it defaults to .txt extension),
    but it accepted me putting it in quotes ("hosts.") - it said it existed,
    did I want to overwrite?; but when I said yes, it said it didn't have permission, or similar. It probably would have worked if I'd done it as administrator, but in that case I might as well use Notepad.>
    works for me on XP

    Editing hosts. wasn't much of a problem for me under 7, either; however,
    under 10, it's been made more difficult. However, with MikeS's help (see another post), I'm there.
    []

    - I recommend you drop your trailing '.'

    (notepad under XP won't open my large hosts file)
    Hmm. It will under 10 with mine, so far.
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    "Bother,"saidPoohwhenhisspacebarrefusedtowork.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 13:43:56 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/12 22:7:28, MikeS wrote:
    []

    This shortcut works for me after setting it to open as administrator by ticking the box:
    %windir%\system32\notepad.exe /A "C:\Windows\System32\drivers\etc\hosts"

    Thanks - that works! I'd got to the same place - ticking the box in the shortcut with almost the above line in it - but it wasn't opening or
    saving the extensionless file. (I could do it manually, but if a
    shortcut can, why faff?) Your solution even saves without having to
    select "all files" etcetera. (Well, I've left the . after hosts inside
    the quotes in my version, as I had it there anyway.)

    It's obviously the

    /A

    switch that made it work. How did you find out about that? (I wondered
    if there _was_ some switch that would help, but both "/?" and "help
    notepad" failed as I have described upthread, so I was a bit stuck
    trying to find out.)
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Burns@usenet@andyburns.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 13:44:14 2025
    From Newsgroup: alt.windows7.general

    J. P. Gilliver wrote:

    Kerr-Mudd, John wrote:

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    The above line works though. But, as it's trying to be a word processor
    Well, these days so is notepad (Win11), you can bold/underline/italicise
    text, and it gets saved in markdown format. Makes me worry how
    faithfully the file is saved with respect to CF/LF vs LF endings etc.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 14:22:55 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/13 13:44:14, Andy Burns wrote:
    J. P. Gilliver wrote:

    Kerr-Mudd, John wrote:

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    The above line works though. But, as it's trying to be a word processor
    Well, these days so is notepad (Win11), you can bold/underline/italicise text, and it gets saved in markdown format.-a Makes me worry how
    faithfully the file is saved with respect to CF/LF vs LF endings etc.

    Ah, that's obviously a difference between 10 and 11. In 10's notepad,
    there's no row of formatting buttons; there's a function to change font,
    but I think that's only what font you see while editing. (I tried
    changing to a bold font, but although I had a line highlighted, it
    changed the whole file I could see, not just that line.) And the only
    options under Save As are Text File (.txt) and All files (*.*), with I
    presume the latter still saving a text file, but allowing you to use a different (or no) extension.

    One wonders why they've done the change you describe; in effect, they've
    made what sounds like a WordPad clone. Do you still have WordPad? Do
    they now look the same? When you say it saves in "markdown" format, what extension is that - .rtf? I presume it still have a text-only _option_
    (.txt), but I share your concern re newline formats.

    Presumably one could copy a notepad.exe from a W10 or earlier. (The one
    from 10 or 7 might have a bigger filesize limit than the one from XP.)
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Burns@usenet@andyburns.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sun Jul 13 15:29:06 2025
    From Newsgroup: alt.windows7.general

    J. P. Gilliver wrote:

    One wonders why they've done the change you describe; in effect, they've made what sounds like a WordPad clone. Do you still have WordPad?

    No, wordpad is gone in latest win11, you can get it back by copying the
    .exe and a couple of .dlls

    Do they now look the same?

    I still looks mostly like notepad (do you get the multi-tab version on
    win10?) bu with a format bar tacked onto the end of the menu bar.

    When you say it saves in "markdown" format, what
    extension is that - .rtf?

    .md files, as used in wikis

    <https://en.wikipedia.org/wiki/Markdown#Examples>

    I presume it still have a text-only _option_
    (.txt), but I share your concern re newline formats.

    yes, if you've used formatting it defaults to .md but offers .txt as an option, with a warning you'll lose the formatting.

    Presumably one could copy a notepad.exe from a W10 or earlier. (The one
    from 10 or 7 might have a bigger filesize limit than the one from XP.)
    I think you can.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Mon Jul 14 20:10:04 2025
    From Newsgroup: alt.windows7.general

    On Sun, 13 Jul 2025 13:36:32 +0100
    "J. P. Gilliver" <G6JPG@255soft.uk> wrote:

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Though I remember that, from I think about Windows 95 or 98 on, it was there, but really just a redirect to Wordpad. And it _seems_ to be that here; hard to tell, as I can't do Help | About, since they've removed
    Help from the menu of lots of things (maybe all integrated ones?) in 10.

    I think it's a synonym,i.e. "write" actually invokes, or is a copy
    of wordpad - but 'write' is what I had in my shortcut from way back.
    []
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Mon Jul 14 22:02:35 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/14 20:10:4, Kerr-Mudd, John wrote:
    On Sun, 13 Jul 2025 13:36:32 +0100
    "J. P. Gilliver" <G6JPG@255soft.uk> wrote:

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Though I remember that, from I think about Windows 95 or 98 on, it was
    there, but really just a redirect to Wordpad. And it _seems_ to be that
    here; hard to tell, as I can't do Help | About, since they've removed
    Help from the menu of lots of things (maybe all integrated ones?) in 10.

    I think it's a synonym,i.e. "write" actually invokes, or is a copy
    of wordpad - but 'write' is what I had in my shortcut from way back.
    []

    Interesting! I remember in wherever WordPad first appeared - Windows 9x
    I think - that write.exe was there (though not called from any shortcut
    in the start menu), but, indeed, invoked WordPad. I can't remember if it
    was a copy of Wordpad, or just some sort of redirect; I think the latter.>
    On this Windows 10 (64 bit), I have wordpad.exe (all details from
    everything):
    2,736 KB, 2019/12/6, in C:\Program Files (x86)\Windows NT\Accessories
    2,904 KB, 2025/7/10 (!), in C:\Program Files\Windows NT\Accessories
    plus various sizes from 36 KB to 2,904 KB in ...\WinSXS\... .

    and write.exe:
    10 KB, 2019/12/6 19:46, in C:\Windows\SysWOW64 and ...\WinSXS\...
    11 KB, 2019/12/6 21:29, in C:\Windows (!), C:\Windows\System32, and ...\WinSXS\... .>
    If I run any of them ones not in WinSXS, what opens loos the same - and,
    even if I ran a write.exe, the title bar says "Document - WordPad", so
    looks like they're a redirect (10 or 11 KB is nowhere near enough to be
    a word processor, at least not if you're Microsoft). I can't check
    versions from running as W10 has removed Help | About from the menu bar
    (well, Help altogether).
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    Back then, many radio sets were still in black and white.
    - Eddie Mair, radio presenter, on "PM" programme reaching 40; in Radio
    Times, 3-9 April 2010
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From micky@NONONOmisc07@fmguy.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 14:32:58 2025
    From Newsgroup: alt.windows7.general

    In alt.comp.os.windows-11, on Sun, 13 Jul 2025 13:36:32 +0100, "J. P.
    Gilliver" <G6JPG@255soft.uk> wrote:

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Hmmm. I don't have a copy in win11.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Paul@nospam@needed.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 14:37:10 2025
    From Newsgroup: alt.windows7.general

    On Tue, 7/15/2025 2:32 PM, micky wrote:
    In alt.comp.os.windows-11, on Sun, 13 Jul 2025 13:36:32 +0100, "J. P. Gilliver" <G6JPG@255soft.uk> wrote:

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Hmmm. I don't have a copy in win11.


    I have five hits on W11 and five hits on W10, for "write.exe".

    Paul
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From MikeS@mikes@is.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 21:47:14 2025
    From Newsgroup: alt.windows7.general

    On 13/07/2025 13:43, J. P. Gilliver wrote:
    On 2025/7/12 22:7:28, MikeS wrote:
    []

    This shortcut works for me after setting it to open as administrator
    by ticking the box:
    %windir%\system32\notepad.exe /A "C:\Windows\System32\drivers\etc\hosts"

    Thanks - that works! I'd got to the same place - ticking the box in the shortcut with almost the above line in it - but it wasn't opening or
    saving the extensionless file. (I could do it manually, but if a
    shortcut can, why faff?) Your solution even saves without having to
    select "all files" etcetera. (Well, I've left the . after hosts inside
    the quotes in my version, as I had it there anyway.)

    It's obviously the

    -a-a-a-a/A

    switch that made it work. How did you find out about that? (I wondered
    if there _was_ some switch that would help, but both "/?" and "help
    notepad" failed as I have described upthread, so I was a bit stuck
    trying to find out.)

    Google found this https://superuser.com/questions/1720078/windows-11-notepad-command-line-options and it seems they still work.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 22:58:06 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/15 21:47:14, MikeS wrote:
    On 13/07/2025 13:43, J. P. Gilliver wrote:
    On 2025/7/12 22:7:28, MikeS wrote:
    []

    This shortcut works for me after setting it to open as administrator
    by ticking the box:
    %windir%\system32\notepad.exe /A "C:\Windows\System32\drivers\etc\hosts"

    Thanks - that works! I'd got to the same place - ticking the box in
    []

    It's obviously the

    -a-a-a-a-a/A

    switch that made it work. How did you find out about that? (I wondered
    if there _was_ some switch that would help, but both "/?" and "help
    notepad" failed as I have described upthread, so I was a bit stuck
    trying to find out.)

    Google found this https://superuser.com/questions/1720078/windows-11-notepad-command-line- options
    and it seems they still work.

    Hmm. According to that, /A means "open file as ansi", which certainly
    doesn't sound like it ought to work to solve the problem I had. But it
    does, so I'm haapy (though puzzled)!
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    Reality television. It's eroding the ability of good scripted television
    to survive. - Patrick Duffy in Radio Times 2-8 February 2013
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marion@facts.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 19:09:44 2025
    From Newsgroup: alt.windows7.general

    On Tue, 15 Jul 2025 14:37:10 -0400, Paul wrote :


    I have five hits on W11 and five hits on W10, for "write.exe".

    This is a public service announcement related to editing the HOSTS file.
    The "App Paths" key is perhaps the most magical key in all of registry.

    What I've been doing, for decades, & which I posted on this newsgroup many times in the past, is I click on my "Runbox" icon in my taskbar and I type "hosts" where that action (which you'll never forget) edits the HOSTS file.

    Win+R > hosts [carriagereturn]

    I forgot how I managed that, since I have hundreds of similar commands on Windows to do what I want simply by typing what I want (e.g., printers).

    There's nothing more magical on WIndows than that App Paths registry key. Everything you ever needed to do, is a simple one-word-command action!

    But how did I do it?
    I don't recall.

    Working backward, I see that "hosts" points to a "hosts.exe" subkey.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hosts.exe

    That "hosts.exe" subkey points to a value which happens to be a shortcut.
    @Default=C:\link\hosts.lnk

    Further reversing the stitching, the " of that shortcut are:
    TARGET=C:\Windows\System32\schtasks.exe /run /TN "Task hosts edit"

    Pulling more thread out, a Win+R > taskschd.msc brings up "Task hosts edit"
    ACTIONS=C:\programs\editors\text\vim\vim.exe C:\windows\system32\drivers\etc\hosts
    [x]Run with highest privileges

    Note: This edits the hosts file in GVim without those annoying UAC prompts. Please try it and let the team know how well it works out for you.

    I think this key is the most valuable key for efficiencey in all Windows.
    --
    Note that hosts.exe is not a file. It's just a subkey. It can be any name.
    But in the App Paths key, the subkeys have to end with "exe" to work magic.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Zaidy036@Zaidy036@air.isp.spam to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Tue Jul 15 22:02:46 2025
    From Newsgroup: alt.windows7.general

    On 7/15/2025 2:32 PM, micky wrote:
    In alt.comp.os.windows-11, on Sun, 13 Jul 2025 13:36:32 +0100, "J. P. Gilliver" <G6JPG@255soft.uk> wrote:

    On 2025/7/12 22:1:13, Kerr-Mudd, John wrote:
    []

    C:\WINDOWS\system32\write.exe c:\windows\system32\drivers\etc\hosts

    Wow, I had no idea write.exe was still there! Though I seem to have
    three copies. (All dated 2019-12-6.)

    Hmmm. I don't have a copy in win11.
    https://www.thewindowsclub.com/hosts-file-in-windows#:~:text=The%20Hosts%20file%20in%20Windows%2011%2F10%2C%20is%20used,file%20is%20used%20by%20Microsoft%20TCP%2FIP%20for%20Windows.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From MikeS@mikes@is.invalid to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Wed Jul 16 08:21:29 2025
    From Newsgroup: alt.windows7.general

    On 15/07/2025 22:58, J. P. Gilliver wrote:
    On 2025/7/15 21:47:14, MikeS wrote:
    On 13/07/2025 13:43, J. P. Gilliver wrote:
    On 2025/7/12 22:7:28, MikeS wrote:
    []

    This shortcut works for me after setting it to open as administrator
    by ticking the box:
    %windir%\system32\notepad.exe /A
    "C:\Windows\System32\drivers\etc\hosts"

    Thanks - that works! I'd got to the same place - ticking the box in
    []

    It's obviously the

    -a-a-a-a-a/A

    switch that made it work. How did you find out about that? (I
    wondered if there _was_ some switch that would help, but both "/?"
    and "help notepad" failed as I have described upthread, so I was a
    bit stuck trying to find out.)

    Google found this
    https://superuser.com/questions/1720078/windows-11-notepad-command-line- options
    and it seems they still work.

    Hmm. According to that, /A means "open file as ansi", which certainly doesn't sound like it ought to work to solve the problem I had. But it
    does, so I'm haapy (though puzzled)!

    The same shortcut works without /A so I'm puzzled as to why you had a
    problem!
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Burns@usenet@andyburns.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Wed Jul 16 10:13:36 2025
    From Newsgroup: alt.windows7.general

    Marion wrote:

    This is a public service announcement related to editing the HOSTS file.
    The "App Paths" key is perhaps the most magical key in all of registry.

    What I've been doing, for decades, & which I posted on this newsgroup many times in the past, is I click on my "Runbox" icon in my taskbar and I type "hosts" where that action (which you'll never forget) edits the HOSTS file.

    Win+R > hosts [carriagereturn]

    "Windows cannot find 'hosts'. Make sure
    you've typed the name correctly, then try again"

    Might you have added the drivers/etc folder to a path, in the registry
    or the environment?


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marion@facts.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Wed Jul 16 20:06:36 2025
    From Newsgroup: alt.windows7.general

    On Wed, 16 Jul 2025 10:13:36 +0100, Andy Burns wrote :


    This is a public service announcement related to editing the HOSTS file.
    The "App Paths" key is perhaps the most magical key in all of registry.

    What I've been doing, for decades, & which I posted on this newsgroup many >> times in the past, is I click on my "Runbox" icon in my taskbar and I type >> "hosts" where that action (which you'll never forget) edits the HOSTS file. >>
    Win+R > hosts [carriagereturn]

    "Windows cannot find 'hosts'. Make sure
    you've typed the name correctly, then try again"

    Might you have added the drivers/etc folder to a path, in the registry
    or the environment?

    Hi Andy,

    Good question. Nobody else noticed but you. That's 'cuz you tried it!
    And that is a good thing because it means you will learn a lot below.

    Very few people know Windows has multiple ways to find the paths.

    I strive for everything I do on Windows to be a single step.
    If it's two steps, then it's half as efficient as it should be.

    That's why, long ago, I added the "hosts" command to the Windows runbox.
    Win+R > hosts (this single step opens up the hosts file for editing)

    I never accept two steps when a single step can be figured out.
    And the magical thing about the way I did it is that it's a single step!

    However... it didn't work for you (and I know why).

    You tried the most magical of all Windows commands, but, unfortunately,
    you skipped something, which almost nobody knows - so don't feel bad(ly).

    First, thanks for trying the Windows magic which I consider the finest efficiency tool that any operating system ever made (other than an alias).

    I completely understand what happened to you when you tried it.
    In fact, it's *supposed* to happen exactly like it did for you.

    So you didn't do anything wrong.

    The magic is that there are TWO ways to find the path to any command:
    a. The Windows "PATH" system variable (and all its variants)
    b. The Windows "App Paths" key (which is inside the registry)

    In fact, what I do BEFORE I set up any magical commands is do what you did.
    If Win+R > hosts actually does something, then I pick a different keyword.

    Since you've helped people on the newsgroup a lot, let me show you.
    Let's take the example of the "regopen" command to illustrate.

    Step 1.
    Enter "regopen" into the Windows Win+R runbox. What happens?
    Windows cannot find "regopen"! Right? Good. You want that to happen.
    That tells you it's an available (i.e., unused) keyword, "regopen".

    Step 2.
    Enter a "regopen.exe" registry subkey in the App Paths registry key.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\regopen.exe
    @Default=C:\path\link\regopen.lnk

    Note: There is no executable called "regopen.exe"; it's just a name.
    For the Windows magic to work, the keyword must end with "exe".

    Step 3: (This is only necessary because we want to avoid the UAC prompt!)
    Create a link with the TARGET being a call to Windows Task Manager.
    TARGET=C:\Windows\System32\schtasks.exe /run /TN "Task Regopen"

    Step 4:
    Create that task in the Windows task manager (Win+R > taskschd.msc).
    Name=Task Regopen (start all your custom tasks with the same keyword!)
    [x]Run with highest privileges (as the whole point is to avoid the UAC!)
    Start a program = C:\Windows\regedit.exe

    Voila!

    Now, when you click your pinned Runbox & type "regopen", up pops the
    registry ready to edit without you having to perform any other clicks.

    If it takes two steps to open the registry, you're doing it inefficiently.

    NOTE: If you didn't want to avoid the UAC prompt, you could skip 3 of the 4 steps above because you can open a file using just step 1 above, and you
    can open up a directory using only steps 1 and 2 above.

    The only reason the setup is four steps instead of just one step, is
    because we have to do extra stuff to avoid the UAC prompt asking for OK.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Zaidy036@Zaidy036@air.isp.spam to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Wed Jul 16 16:36:32 2025
    From Newsgroup: alt.windows7.general

    On 7/16/2025 4:06 PM, Marion wrote:
    On Wed, 16 Jul 2025 10:13:36 +0100, Andy Burns wrote :


    This is a public service announcement related to editing the HOSTS file. >>> The "App Paths" key is perhaps the most magical key in all of registry.

    What I've been doing, for decades, & which I posted on this newsgroup many >>> times in the past, is I click on my "Runbox" icon in my taskbar and I type >>> "hosts" where that action (which you'll never forget) edits the HOSTS file. >>>
    Win+R > hosts [carriagereturn]

    "Windows cannot find 'hosts'. Make sure
    you've typed the name correctly, then try again"

    Might you have added the drivers/etc folder to a path, in the registry
    or the environment?

    Hi Andy,

    Good question. Nobody else noticed but you. That's 'cuz you tried it!
    And that is a good thing because it means you will learn a lot below.

    Very few people know Windows has multiple ways to find the paths.

    I strive for everything I do on Windows to be a single step.
    If it's two steps, then it's half as efficient as it should be.

    That's why, long ago, I added the "hosts" command to the Windows runbox.
    Win+R > hosts (this single step opens up the hosts file for editing)

    I never accept two steps when a single step can be figured out.
    And the magical thing about the way I did it is that it's a single step!

    However... it didn't work for you (and I know why).

    You tried the most magical of all Windows commands, but, unfortunately,
    you skipped something, which almost nobody knows - so don't feel bad(ly).

    First, thanks for trying the Windows magic which I consider the finest efficiency tool that any operating system ever made (other than an alias).

    I completely understand what happened to you when you tried it.
    In fact, it's *supposed* to happen exactly like it did for you.

    So you didn't do anything wrong.

    The magic is that there are TWO ways to find the path to any command:
    a. The Windows "PATH" system variable (and all its variants)
    b. The Windows "App Paths" key (which is inside the registry)

    In fact, what I do BEFORE I set up any magical commands is do what you did. If Win+R > hosts actually does something, then I pick a different keyword.

    Since you've helped people on the newsgroup a lot, let me show you.
    Let's take the example of the "regopen" command to illustrate.

    Step 1.
    Enter "regopen" into the Windows Win+R runbox. What happens?
    Windows cannot find "regopen"! Right? Good. You want that to happen.
    That tells you it's an available (i.e., unused) keyword, "regopen".

    Step 2.
    Enter a "regopen.exe" registry subkey in the App Paths registry key.
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\regopen.exe
    @Default=C:\path\link\regopen.lnk

    Note: There is no executable called "regopen.exe"; it's just a name.
    For the Windows magic to work, the keyword must end with "exe".

    Step 3: (This is only necessary because we want to avoid the UAC prompt!)
    Create a link with the TARGET being a call to Windows Task Manager.
    TARGET=C:\Windows\System32\schtasks.exe /run /TN "Task Regopen"

    Step 4:
    Create that task in the Windows task manager (Win+R > taskschd.msc).
    Name=Task Regopen (start all your custom tasks with the same keyword!)
    [x]Run with highest privileges (as the whole point is to avoid the UAC!)
    Start a program = C:\Windows\regedit.exe

    Voila!

    Now, when you click your pinned Runbox & type "regopen", up pops the
    registry ready to edit without you having to perform any other clicks.

    If it takes two steps to open the registry, you're doing it inefficiently.

    NOTE: If you didn't want to avoid the UAC prompt, you could skip 3 of the 4 steps above because you can open a file using just step 1 above, and you
    can open up a directory using only steps 1 and 2 above.

    The only reason the setup is four steps instead of just one step, is
    because we have to do extra stuff to avoid the UAC prompt asking for OK.

    for Win 11 just enter "hosts" into taskbar search box and you will
    eventually get to "C:\Windows\System32\drivers\etc\hosts" which is
    actually a txt file.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Andy Burns@usenet@andyburns.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Wed Jul 16 22:14:28 2025
    From Newsgroup: alt.windows7.general

    Zaidy036 wrote:

    for Win 11 just enter "hosts" into taskbar search box and you will eventually get to "C:\Windows\System32\drivers\etc\hosts" which is
    actually a txt file.

    Yesbut ... you can't just edit it unless you're an admin, or you edit it
    as admin ...

    I don't understand why the various shortcuts mentioned early in the
    thread wouldn't work.

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From J. P. Gilliver@G6JPG@255soft.uk to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Thu Jul 17 01:33:48 2025
    From Newsgroup: alt.windows7.general

    On 2025/7/16 8:21:29, MikeS wrote:
    On 15/07/2025 22:58, J. P. Gilliver wrote:
    On 2025/7/15 21:47:14, MikeS wrote:
    On 13/07/2025 13:43, J. P. Gilliver wrote:
    On 2025/7/12 22:7:28, MikeS wrote:
    []

    This shortcut works for me after setting it to open as
    administrator by ticking the box:
    %windir%\system32\notepad.exe /A "C:
    \Windows\System32\drivers\etc\hosts"

    Thanks - that works! I'd got to the same place - ticking the box in
    []

    It's obviously the

    -a-a-a-a-a/A

    switch that made it work. How did you find out about that? (I
    wondered if there _was_ some switch that would help, but both "/?"
    and "help notepad" failed as I have described upthread, so I was a
    bit stuck trying to find out.)

    Google found this
    https://superuser.com/questions/1720078/windows-11-notepad-command-
    line- options
    and it seems they still work.

    Hmm. According to that, /A means "open file as ansi", which certainly
    doesn't sound like it ought to work to solve the problem I had. But it
    does, so I'm haapy (though puzzled)!

    The same shortcut works without /A so I'm puzzled as to why you had a problem!

    Yes, I've just tried removing it from my shortcut, and it still works
    for me too now!
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf

    It costs a lot to look this cheap - Dolly Parton
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marion@facts.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Thu Jul 17 01:52:23 2025
    From Newsgroup: alt.windows7.general

    On Wed, 16 Jul 2025 22:14:28 +0100, Andy Burns wrote :


    Zaidy036 wrote:

    for Win 11 just enter "hosts" into taskbar search box and you will
    eventually get to "C:\Windows\System32\drivers\etc\hosts" which is
    actually a txt file.

    Yesbut ... you can't just edit it unless you're an admin, or you edit it
    as admin ...

    I don't understand why the various shortcuts mentioned early in the
    thread wouldn't work.

    Everyone has their own religious beliefs, and I have mine, so I won't
    chastise Zaidy036 for suggesting to use, aurgh, a Windows "search".

    Zaidy has helped me a lot over the years, so it's not an attack on him that
    my personal religious is to never need to use a search in decades on Win10.

    Not even once have I ever needed (nor should I) to surrender to a search.
    My opinion is if I have ot run a search, then I set up my PC the wrong way.

    Everything I need to do should be a single tap away.
    If it's not a single tap away, then I make it a single tap away.

    Which is what I did with the "hosts" command (and the "regopen" command),
    and with, oh, I don't know, hundreds of other obvious commands.

    But all that religiosity aside, I'm well aware that most people search.
    Hell, most people search to open an admin command line prompt!

    Instead of the three-fingered salute: Win+R > cmd {Ctrl+Shft+Enter}
    Why do something in two steps when you can easily do it in one step.

    Back to Andy's dilemma, I do not understand what is not working for Andy.

    If you make a shortcut to a scheduled task, if that scheduled task has the checkmark to run as administrator, it should edit. I haven't tried it but
    we should be able to edit the hosts file just by this TARGET:
    TARGET=C:\Windows\System32\schtasks.exe /run /TN "Task hosts edit"
    Where the task of editing the host would either be this simple...
    gvim.exe C:\windows\system32\drivers\etc\hosts
    Or, sometimes I find comspec works when things aren't all lined up.
    %comspec% /c "gvim.exe C:\windows\system32\drivers\etc\hosts"

    I don't see any reason why that wouldn't work - but - and this is important
    - I wasn't reading all the posts in this thread because I had solved this
    very problem so many decades ago that I had to look up how I solved it.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Marion@marion@facts.com to alt.comp.os.windows-10,alt.comp.os.windows-11,alt.windows7.general on Sat Jul 19 03:08:51 2025
    From Newsgroup: alt.windows7.general

    On Thu, 17 Jul 2025 01:52:23 -0000 (UTC), Marion wrote :


    Back to Andy's dilemma, I do not understand what is not working for Andy.

    Andy,
    What's not working.

    Maybe I can try it for you to help you out?
    --- Synchronet 3.21a-Linux NewsLink 1.2