Avatar of Justin Collins
Justin Collins
Flag 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?
ProgrammingInstallation

Avatar of undefined
Last Comment
callrs

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
callrs

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Justin Collins

ASKER
ok, where do I put that, after each install?
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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck