Link to home
Start Free TrialLog in
Avatar of Justin Collins
Justin CollinsFlag for United States of America

asked on

Make a batch file write to notepad document.

I am creating a batch file that runs through 6 different autoinstalls.  Is there any way to have the batchfile write to a notepad document after each individual install to verify everything installed correctly?
ASKER CERTIFIED SOLUTION
Avatar of callrs
callrs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Justin Collins

ASKER

ok, where do I put that, after each install?
Avatar of callrs
callrs

Sorry.
Did you get it working? Can put it anywhere, or use at as a subroutine e.g. in XP:

@echo off
setlocal
set F=logfile.txt
::...statements to do install etc
::then call sub
call :message "My message"
::...more statements for install etc.
::then call sub again
call :message "My message 2"
goto :eof


:message
set msg=%1
echo. >> %F%
echo %date%  %time% >> %F%
echo. >> %F%
echo %msg% >> %F%
goto :eof