Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #47601
| From | Lionel Muller <Erhohterlowe@neomailbox.com> |
|---|---|
| Newsgroups | alt.comp.os.windows-10 |
| Subject | Re: What is the easiest way to edit the hosts file on Windows as admin? |
| Date | 2017-07-11 17:36 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ok32a4$1jva$1@gioia.aioe.org> (permalink) |
| References | <ok1sqo$1llk$1@gioia.aioe.org> <ok2kei$4d1$1@dont-email.me> |
For alt.comp.os.windows-10 Mayayana wrote:
> A side note that might be of interest to people
> who edit HOSTS:
>
> http://mayakron.altervista.org/wikibase/show.php?id=AcrylicHome
Thank you Mayayana for the Acrylic DNS suggestion which I already knew
about and which is a great way to reduce my hosts file from the 30,000
lines it currently is to probably down to only ten thousand lines or so.
I really should have made the OP more clear because almost all the answers
are off target, which is my fault.
So if I could start again, I'd say this isn't a question which has an
obvious answer since the goal is to get as close to a single-click admin
editing of the hosts file as possible.
Anyone can edit the hosts file in a series of clicks, but it takes an
expert to do it in one click.
That's why I'm asking the experts here for advice.
If the hosts file ended with "txt" it would be trivial.
If the hosts file didn't have to be edited as admin, it would be trivial.
But the fact is that Windows doesn't do anything automatic by default with
a file that has no extension other than to pop up a search for the editor,
which is a waste of steps for a file that I know what I want to edit it in.
Also, it has to be edited as admin.
It was my fault for not being clear that only a Windows expert could
possibly answer the question, as I already tried to do it in a single step:
Start > Run > hosts <return>
I can get that to easily work if I don't have to edit as admin and if the
hosts file had an extension, so what I'm trying to get is a single click
admin edit of the hosts file sans extension.
We solved a very similar problem with opening up a command window as admin
just a few weeks ago, so I tried the batch file method, but it failed.
What would you modify in this batch file (which opens a command window as
admin) to make it edit the hosts file instead?
===================
@ECHO OFF
REM Open a new shell "Run As Administrator"
REM Based on script by foxidrive on alt.msdos.batch
SETLOCAL ENABLEEXTENSIONS
IF NOT "%~1"=="" goto :START
SET MyFile=%TEMP%\Admin.vbs"
Echo Set UAC = CreateObject("Shell.Application") >"%MyFile%"
Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 >>"%MyFile%"
Start "" /MIN "%MyFile%"
goto :EOF
:START
Cmd /k "CD /D "%*" & Echo Administrator: & color 4F"\
===================
This didn't work but I really don't know what it's doing.
===================
@ECHO OFF
SET MyFile=C:\Windows\System32\Drivers\etc\hosts
Echo Set UAC = CreateObject("Shell.Application") >"%MyFile%"
Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 >>"%MyFile%"
Start "" /MIN "notepad.exe %MyFile%"
===================
Back to alt.comp.os.windows-10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 06:56 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 07:07 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Auric__" <not.my.real@email.address> - 2017-07-11 07:33 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lucifer Morningstar <not@for.mail> - 2017-07-11 17:44 +1000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:19 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Zeezicht <zeezicht_adelin.remove@telenet.remove.be> - 2017-07-11 11:23 +0200
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:19 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "s|b" <me@privacy.invalid> - 2017-07-11 13:49 +0200
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:19 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? slate_leeper <bycy-r0bj@spamex.com> - 2017-07-11 09:15 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Mike Tomlinson <mike@jasper.org.uk> - 2017-07-11 16:33 +0100
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:29 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-11 09:43 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:36 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-11 18:40 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 23:48 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-12 00:00 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Auric__" <not.my.real@email.address> - 2017-07-12 07:32 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-12 08:14 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 12:31 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-07-12 10:55 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Sam Hill <sam@example.com> - 2017-07-12 15:25 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-07-12 18:41 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-12 13:01 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2017-07-12 18:46 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 17:46 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Big Al <BigAl@invalid.com> - 2017-07-11 10:37 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:19 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 17:48 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 13:38 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 19:11 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 20:41 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 17:34 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 23:48 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 23:53 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 23:58 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:58 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-12 13:37 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 19:00 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-13 22:34 -0700
Re: What is the easiest way to edit the hosts file on Windows as admin? Paul <nospam@needed.invalid> - 2017-07-14 02:10 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-14 07:43 -0700
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-14 12:12 -0700
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-11 20:51 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 17:27 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 23:48 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 23:52 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 12:02 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? "Mayayana" <mayayana@invalid.nospam> - 2017-07-12 09:15 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 13:26 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 17:54 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 23:48 +0200
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 21:54 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 23:10 +0100
Re: What is the easiest way to edit the hosts file on Windows as admin? Ken Blake <Ken@invalid.news.com> - 2017-07-11 12:38 -0700
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 19:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 17:40 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 23:48 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Char Jackson <none@none.invalid> - 2017-07-11 23:01 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 20:41 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? jetjock <jetjock@example.com> - 2017-07-11 13:56 -0500
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 19:11 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 20:41 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-11 20:59 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Gralber@grelberville.org - 2017-07-11 20:06 -0400
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 11:49 +0000
Re: What is the easiest way to edit the hosts file on Windows as admin? Nomen Nescio <nobody@dizum.com> - 2017-07-12 20:04 +0200
Re: What is the easiest way to edit the hosts file on Windows as admin? Lionel Muller <Erhohterlowe@neomailbox.com> - 2017-07-12 19:00 +0000
csiph-web