VarjuOrg

Linux / Windows – what's the difference…

Script kuidas lisada mingit hosti HOSTS faili…

On tekkinud vajadus, millal arvuti teps mitte ei kasutama DNS’i vaid minema otse kuskile aadressile.

Selle välistamiseks sai loodud koodijupp:

@echo ##########################################
@echo #####  Adding new server to HOSTS  #########
@echo ##########################################
@echo OFF
title Adding server to HOSTS file
rem Kristjan T 2011
set /p adre= Enter desired destination IP:
set /p adre2= Enter destination webaddress:
echo %adre%  %adre2%  >> C:WINDOWSsystem32driversetchosts
@echo
@echo %adre2% added to HOSTS file.
@PAUSE

Kasutamiseks: Loo desktopil uus txtfail, kleebi kood sinna, Fail>Save as>add_server_to_hosts.bat

Edukat testimist.

Leave a Reply

Your email address will not be published. Required fields are marked *