Page 1 of 1

Echo line

Posted: 29 Jul 2012 18:19
by alperefe

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

Re: Echo line

Posted: 29 Jul 2012 20:00
by Squashman
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 .......
)

Re: Echo line

Posted: 30 Jul 2012 01:11
by alperefe
well there will be a long list applications in the batch so I need space :)