F
Figo
Hi All, I would like to add entrys to Windows XP Host Table using dos
command line, which command can I use and how ?
Thanks a lot
command line, which command can I use and how ?
Thanks a lot
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Figo said:Hi All, I would like to add entrys to Windows XP Host Table using dos
command line, which command can I use and how ?
Figo said: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 ?
Figo said: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 ?
Hi All, I would like to add entrys to Windows XP Host Table using dos
command line, which command can I use and how ?
Thanks a lot
Figo said:it is because I have about 20 PCs' Host Table need to edit, so it would
be more easy and quickly if there has a batch for auto apply the edit
echo nn.nn.nn.nn hostname >> c:\windows\system32\drivers\etc\hosts
build up a batch file using the syntax above where each line
represents the entry you want to add to hosts.
Still not clear why you stick with the command line since any WSH script
will do that. Here's an example that you may want to modify accordingly:http://www.computerperformance.co.uk/vbscript/vbscript_file_opentextf...
In case of further questions (not a Windows issue) repost to
news://msnews.microsoft.com/microsoft.public.scripting.wsh
Good luck.
[email protected] said:Why would he want to learn the basics of a scripting language, that is
presumably completely alien to him, to do something that can easily be
done with one legacy shell command and output redirection?
Because it's more flexible. Your simple shell command fails when the
%SystemRoot% directory is named "WinNT" (example) rather than "Windows"
or when located on a drive other than the C: drive. In addition, it's
up to the OP which way to go and your opion is of little interest to me.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.