I have a batch file that I need to run in Windows 2000 and Windows 98 machines. Part of the bach file (in theory) captures the machine name and writes it to a log file via an echo command. The problem is, on 98 machines, sometimes it logs the machine name and other times it logs the words “echo is off” instead. The same PC will log it different ways. I have found no pattern as to why it will record the machine name one time and the words “echo is off” other times. The batch file is below. I would appreciate any help…
NET CONFIG | FIND /I “Computer Name” > %temp%.\netconf$.bat
echo >> computer.bat r:\tammy\cae\winset COMPUTERNAME = %%2
call %temp%.\netconf$.bat
echo %computername% >> r:\tammy\cae\done\w98.txt
GOTO END