REM Appendhost.bat
echo 192.168.30.1 server1 >> %SYSTEMDRIVE%\Windows\System32\Drivers\Etc\Hosts
echo 192.168.35.2 server2 >> %SYSTEMDRIVE%\Windows\System32\Drivers\Etc\Hosts
echo 192.168.40.3 server3 >> %SYSTEMDRIVE%\Windows\System32\Drivers\Etc\Hosts
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
Try copying the hosts file to a different location, say c:\temp, then adjust the BAT script to reference that directory, and see if you have the same problem when you run it.
~bp