Echo line

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alperefe
Posts: 9
Joined: 20 Jun 2012 21:22

Echo line

#1 Post by alperefe » 29 Jul 2012 18:19

Code: Select all

@ECHO OFF
REM -- Prepare the Command Processor
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

REM -- Set Color and Window Mode
set Clr=color 30 & set Wnd=MODE CON: COLS=49 LINES=56

:Install
REM -- Install Applications
cls&%Wnd%&%Clr%
ECHO.³ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß³
ECHO.³ÄÄijStatus³ÄÄÄÄÄÄÄÄÄijApplication³ÄÄÄÄÄÄÄÄÄÄÄij
ECHO.³                                              ³
PUSHD %~dp0
FOR %%A IN (*-install*.EXE) DO (
        CALL :sub %%~nA
      Echo=³
        Echo=³ Installing.........!app_title!
        call:sleep 3
        %%~fA)
ECHO.&ECHO. == Press any key to exit. == &PAUSE>NUL&GOTO:EOF
::SHUTDOWN.EXE /r /t 0
GOTO :EOF

::-----------------------------------------------------------------------::
::------------ Auxilary Functions ------------------------------ ----------::
::-----------------------------------------------------------------------::
:sub
SET "app_title=%*"
FOR /F "DELIMS=-" %%B IN ("%app_title:*-install*=%") DO SET "app_title=%%B"
GOTO:EOF

:sleep -– waits some seconds before returning
::     -- %~1 – in, number of seconds to wait
FOR /l %%a in (%~1,-1,1) do (ping -n 2 -w 1 127.0.0.1>NUL)
goto:EOF


I have code like this and I would like to have help with line "Echo=³ Installing.........!app_title!"
Is there a way to change the line like "Echo=³ Done.........!app_title!" after the installation is complete. so the user can see when the installation is finished.

thanx in advance

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Echo line

#2 Post by Squashman » 29 Jul 2012 20:00

Maybe I am not understanding your question but what is stopping you from adding in an echo command after the exe file is executed.
%%~fA
Echo .......
)

alperefe
Posts: 9
Joined: 20 Jun 2012 21:22

Re: Echo line

#3 Post by alperefe » 30 Jul 2012 01:11

well there will be a long list applications in the batch so I need space :)

Post Reply