thanks for ur reply,
in fact, I would like to create a batch file to auto add some default entrys
to the Host Table ( when I run the batch ), can I do it ? thanks again
"Elmo" <elmogeek@iglou.invalid> wrote in message
news:uq86S7xQIHA.2208@TK2MSFTNGP06.phx.gbl...
> Figo wrote:
>> but if I want to use a command to auto add "10.190.10.90 for
>> homepage.com.hk" in the host table and save, instead of use EDIT in
>> command, then manually type these words and same save the file, how can I
>> do it ?
>>
>>
>> "Detlev Dreyer" <detdreyer@flashmail.com> wrote in message
>> news:1d69ee79b0e49de11f6dbccc4cc48a96@d-d.mvps.org...
>>> "Figo" <figo@gmail.com> wrote:
>>>
>>>> Hi All, I would like to add entrys to Windows XP Host Table using dos
>>>> command line, which command can I use and how ?
>>> Type at the command prompt:
>>>
>>> CD %SystemRoot%\System32\drivers\etc
>>> edit hosts
>
> Create a shortcut to:
>
> Notepad.exe %SystemRoot%\System32\drivers\etc\hosts
>
> Name it "Edit Hosts" or another appropriate name. Double-click the
> shortcut when you want to add to it. That's got to be as quick as
> entering the data into a batch file, or elsewhere, I suspect.
>
> But, I guess you could create a batch file that prompts for the entry,
> then appends it.. I can't tell you how it would be done though.
>
> --
> Joe =o)